Skip to content
This repository was archived by the owner on Dec 23, 2022. It is now read-only.

Commit 520e9ee

Browse files
committed
Apply the errorStyle on the error text.
Fixes #136.
1 parent 858aa48 commit 520e9ee

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ChipInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ class ChipInput extends React.Component {
460460
const shrinkFloatingLabel = floatingLabelText && (hasInput || this.state.isFocused || floatingLabelFixed)
461461

462462
const errorTextElement = this.state.errorText && (
463-
<div style={prepareStyles(styles.error)}>{this.state.errorText}</div>
463+
<div style={prepareStyles(Object.assign(styles.error, errorStyle))}>{this.state.errorText}</div>
464464
)
465465

466466
const floatingLabelTextElement = floatingLabelText && (

stories/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@ storiesOf('ChipInput', module)
125125
errorText='This is an error.'
126126
/>
127127
))
128+
.add('with errorStyle', () => themed(
129+
<ChipInput
130+
errorText='This is an error.'
131+
errorStyle={{ color: 'purple' }}
132+
/>
133+
))
128134
.add('without underline', () => themed(
129135
<ChipInput
130136
defaultValue={['foo', 'bar']}

0 commit comments

Comments
 (0)