mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
fix(): update to Stencil One 🎉🎊
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { Component, ComponentInterface, Element, Prop } from '@stencil/core';
|
||||
import { Component, ComponentInterface, Element, Prop, h } from '@stencil/core';
|
||||
|
||||
import { Color, Mode } from '../../interface';
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { Color } from '../../interface';
|
||||
import { createColorClasses } from '../../utils/theme';
|
||||
|
||||
@Component({
|
||||
@ -10,8 +11,6 @@ import { createColorClasses } from '../../utils/theme';
|
||||
})
|
||||
export class ToolbarTitle implements ComponentInterface {
|
||||
|
||||
mode!: Mode;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
/**
|
||||
@ -22,8 +21,9 @@ export class ToolbarTitle implements ComponentInterface {
|
||||
@Prop() color?: Color;
|
||||
|
||||
private getMode() {
|
||||
const mode = getIonMode(this);
|
||||
const toolbar = this.el.closest('ion-toolbar');
|
||||
return (toolbar && toolbar.mode) || this.mode;
|
||||
return (toolbar && toolbar.mode) || mode;
|
||||
}
|
||||
|
||||
hostData() {
|
||||
|
||||
Reference in New Issue
Block a user