Skip to content

Commit

Permalink
Making tabs use theme colors for their text
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Villarreal committed Oct 27, 2015
1 parent 23e4080 commit 83c610f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/card/card-text.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const CardText = React.createClass({
},

getInitialState() {
return {
return {
muiTheme: this.context.muiTheme ? this.context.muiTheme : ThemeManager.getMuiTheme(DefaultRawTheme),
};
},
Expand All @@ -45,7 +45,7 @@ const CardText = React.createClass({
},

getStyles() {
let themeVariables = this.state.muiTheme.cardText;
const themeVariables = this.state.muiTheme.cardText;
return {
root: {
padding: 16,
Expand Down
2 changes: 2 additions & 0 deletions src/styles/theme-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ module.exports = {
},
tabs: {
backgroundColor: rawTheme.palette.primary1Color,
textColor: ColorManipulator.fade(rawTheme.palette.alternateTextColor, 0.6),
selectedTextColor: rawTheme.palette.alternateTextColor,
},
textField: {
textColor: rawTheme.palette.textColor,
Expand Down
2 changes: 1 addition & 1 deletion src/tabs/tab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Tab = React.createClass({
textAlign: 'center',
verticalAlign: 'middle',
height: 48,
color: selected ? 'rgba(255,255,255,1)' : 'rgba(255,255,255,0.6)',
color: selected ? this.state.muiTheme.tabs.selectedTextColor : this.state.muiTheme.tabs.textColor,
outline: 'none',
fontSize: 14,
fontWeight: 500,
Expand Down

0 comments on commit 83c610f

Please sign in to comment.