import { Checkbox } from 'antd'
<Checkbox style={{ color: 'red', backgroundColor: 'black' }}>Dr John</Checkbox>
Run Code Online (Sandbox Code Playgroud)
How to change the color of the check box not the label 'Dr John'? The above style only change the styles of the label not the check box?
您可以使用简单的CSS
.ant-checkbox-checked .ant-checkbox-inner {
background-color: red;
border-color: red;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
918 次 |
| 最近记录: |