From 23e4080828750687d475ab4812319ae46d1386cd Mon Sep 17 00:00:00 2001 From: Andres Villarreal Date: Tue, 27 Oct 2015 15:23:32 -0600 Subject: [PATCH] Making card-text pull its text color from the theme --- src/card/card-text.jsx | 9 ++------- src/styles/theme-manager.js | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/card/card-text.jsx b/src/card/card-text.jsx index 021f7e6ac228fe..b464566d5ea0bf 100644 --- a/src/card/card-text.jsx +++ b/src/card/card-text.jsx @@ -44,18 +44,13 @@ const CardText = React.createClass({ actAsExpander: React.PropTypes.bool, }, - getDefaultProps() { - return { - color: Styles.Colors.ck, - }; - }, - getStyles() { + let themeVariables = this.state.muiTheme.cardText; return { root: { padding: 16, fontSize: '14px', - color: this.props.color, + color: this.props.color ? this.props.color : themeVariables.textColor, }, }; }, diff --git a/src/styles/theme-manager.js b/src/styles/theme-manager.js index a9a682cf934e55..a21aaccd75b8e1 100644 --- a/src/styles/theme-manager.js +++ b/src/styles/theme-manager.js @@ -21,6 +21,9 @@ module.exports = { minWidth: 88, iconButtonSize: rawTheme.spacing.iconSize * 2, }, + cardText: { + textColor: rawTheme.palette.textColor, + }, checkbox: { boxColor: rawTheme.palette.textColor, checkedColor: rawTheme.palette.primary1Color,