summaryrefslogtreecommitdiffhomepage
path: root/app/components/Switch.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-07-21 10:14:51 +0100
committerAndrej Mihajlov <and@codeispoetry.ru>2017-07-21 10:14:51 +0100
commitfc7fbd09cb4cc77f56f8ab15af4e1f2669f385a7 (patch)
tree5dd213beeea22d9c6f29297f7d515e26efc784bb /app/components/Switch.js
parentbe75990c6ebdd7f0ee356775ecd017b6e3bc0fc0 (diff)
parent14eb55140257e70242ac8aa7319c75dc62e1bd64 (diff)
downloadmullvadvpn-fc7fbd09cb4cc77f56f8ab15af4e1f2669f385a7.tar.xz
mullvadvpn-fc7fbd09cb4cc77f56f8ab15af4e1f2669f385a7.zip
Merge branch 'settings-tests'
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 } />
);