Skip to content

Commit ebee94a

Browse files
committed
fix how we're taking the color value in TextField
1 parent 6efd223 commit ebee94a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/inputs/TextField.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,8 @@ export default class TextField extends BaseInput {
474474
} = this.getThemeProps();
475475
const typography = this.getTypography();
476476
const {lineHeight, ...typographyStyle} = typography;
477-
const color = this.getStateColor(this.props.color || this.extractColorValue());
477+
// color priority is: user's color prop, then modifiers, then theme props.
478+
const color = this.getStateColor(this.props.color || this.extractColorValue() || this.getThemeProps().color);
478479
const hasRightElement = this.shouldDisplayRightButton() || rightIconSource;
479480
const inputStyle = [
480481
hasRightElement && this.styles.rightElement,

0 commit comments

Comments
 (0)