mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(title): support color
This commit is contained in:
@ -12,6 +12,10 @@
|
|||||||
transform: translateZ(0);
|
transform: translateZ(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:host(.ion-color) {
|
||||||
|
color: #{current-color(base)};
|
||||||
|
}
|
||||||
|
|
||||||
.toolbar-title {
|
.toolbar-title {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, Prop } from '@stencil/core';
|
import { Component, Prop } from '@stencil/core';
|
||||||
import { Color, Mode } from '../../interface';
|
import { Color, Mode } from '../../interface';
|
||||||
|
import { createColorClasses } from '../../utils/theme';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-title',
|
tag: 'ion-title',
|
||||||
@ -21,6 +22,12 @@ export class ToolbarTitle {
|
|||||||
*/
|
*/
|
||||||
@Prop() color?: Color;
|
@Prop() color?: Color;
|
||||||
|
|
||||||
|
hostData() {
|
||||||
|
return {
|
||||||
|
class: createColorClasses(this.color)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return [
|
return [
|
||||||
<div class="toolbar-title">
|
<div class="toolbar-title">
|
||||||
|
Reference in New Issue
Block a user