Skip to content

Commit

Permalink
fix(title): support color
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jul 28, 2018
1 parent 520da8d commit 7da0ac4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/components/title/title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
transform: translateZ(0);
}

:host(.ion-color) {
color: #{current-color(base)};
}

.toolbar-title {
display: block;

Expand Down
7 changes: 7 additions & 0 deletions core/src/components/title/title.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Component, Prop } from '@stencil/core';
import { Color, Mode } from '../../interface';
import { createColorClasses } from '../../utils/theme';

@Component({
tag: 'ion-title',
Expand All @@ -21,6 +22,12 @@ export class ToolbarTitle {
*/
@Prop() color?: Color;

hostData() {
return {
class: createColorClasses(this.color)
};
}

render() {
return [
<div class="toolbar-title">
Expand Down

0 comments on commit 7da0ac4

Please sign in to comment.