Skip to content

checkedChildren and uncheckedChildren style overides #27

Open

Description

@evenstensberg

Hi! Currently the checkChildren and uncheckedChildren doesn't support classNames, as you render those as svgs. Will you support a way to do that?

Activity

  1. teddybee commented on Oct 21, 2018

    @teddybee

    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.

  2. delenzhang commented on Nov 7, 2018

    @delenzhang

    image
    <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; } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions