setting Style attributes is working with that.
<Input
style={{ borderWidth: this.state.focused ? "4px" : "1px" }}
placeholder="this works"
onMouseEnter={() => this.setState({ focused: true })}
onMouseLeave={() => this.setState({ focused: false })}
/>
However, when I use the suffix or prefix attribute of Input component, It doesn't work.
<Input
style={{ borderWidth: this.state.focused ? "4px" : "1px" }}
placeholder="not this"
/*only difference is this suffix line*/
suffix={<Icon type="save" />}
onMouseEnter={() => this.setState({ focused: true })}
onMouseLeave={() => this.setState({ focused: false })}
/>
When I check the source codes on browser, It gives me the reason.
1.case :
<input placeholder="this works" type="text" class="ant-input" style="border-width: 1px;">
2.case :
<span class="ant-input-affix-wrapper" style="border-width: 1px;"><input placeholder="not this" type="text" class="ant-input"><span class="ant-input-suffix"><i class="anticon anticon-save"></i></span></span>
the reason for 2. case span block absorbs the style.
So How can I set my style on a input that has a suffix/prefix attribute.