switch
switch copied to clipboard
checkedChildren and uncheckedChildren style overides
Hi! Currently the checkChildren and uncheckedChildren doesn't support classNames, as you render those as svgs. Will you support a way to do that?
I have similar problem. The words for checked and unchecked children is 4-6 characters long and I can't set the width of the switch.
<Switch onChange={this.onSwitchChange.bind(this, recode)} checkedChildren={'正常' + value} defaultChecked={value!==1} unCheckedChildren={'禁用'+ value} className={'hack-switch'} />;
.hack-switch { width: 54px; &.rc-switch-checked:after { left: 32px; } }