'How to change the background color of an ant.design InputNumber?
<InputNumber
min={13}
max={125}
defaultValue={this.props.defaultValue}
style={{
width: this.props.width,
borderColor: this.props.colorTheme.text6Color, <= Working
backgroundColor: this.props.colorTheme.text7Color, <= edits the rectangle behind the white rectangle with circle edges
background: this.props.colorTheme.text7Color, <= Not working
color: this.props.colorTheme.keyText3Color <= Not working
}}
/>
How can I style the back of the InputNumber?
Solution 1:[1]
Are you using plain CSS?
If you just want to change the color, you may try:
backgroundColor: this.props.colorTheme.text7Color
Solution 2:[2]
Use
style={{backgroundColor: this.props.colorTheme.text7Color}}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Yuri Nalin |
Solution 2 | Rajiv Guliani |