update Switch.jsx

old
Fred Guest 2016-02-08 10:45:47 -08:00
parent dba62cf913
commit 413ddb7ca8
1 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class Switch extends React.Component {
if (this.props.className) className += ` ${this.props.className}`; if (this.props.className) className += ` ${this.props.className}`;
return ( return (
<label data-react-toolbox='checkbox' className={className}> <label data-react-toolbox='switch' className={className}>
<input <input
{...others} {...others}
checked={this.props.checked} checked={this.props.checked}
@ -52,7 +52,7 @@ class Switch extends React.Component {
ref='input' ref='input'
type='checkbox' type='checkbox'
/> />
<span role='switch' className={switchClassName}> <span className={switchClassName}>
<Thumb disabled={this.props.disabled} /> <Thumb disabled={this.props.disabled} />
</span> </span>
{this.props.label ? <span className={style.text}>{this.props.label}</span> : null} {this.props.label ? <span className={style.text}>{this.props.label}</span> : null}