summaryrefslogtreecommitdiffhomepage
path: root/app/components/Switch.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/Switch.js')
-rw-r--r--app/components/Switch.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/components/Switch.js b/app/components/Switch.js
index c278cfbd2c..4f97c4d992 100644
--- a/app/components/Switch.js
+++ b/app/components/Switch.js
@@ -120,8 +120,14 @@ export default class Switch extends Component {
}
render(): React.Element<*> {
+ const { isOn, onChange, ...otherProps } = this.props; // eslint-disable-line no-unused-vars
+ let className = ('switch' + ' ' + (otherProps.className || '')).trim();
return (
- <input type="checkbox" ref={ this.onRef } className="switch" checked={ this.props.isOn }
+ <input { ...otherProps }
+ type="checkbox"
+ ref={ this.onRef }
+ className={ className }
+ checked={ isOn }
onMouseDown={ this.handleMouseDown }
onChange={ this.handleChange } />
);