diff --git a/js/src/common/components/Switch.js b/js/src/common/components/Switch.js index 8d58dfab4..b1122352b 100644 --- a/js/src/common/components/Switch.js +++ b/js/src/common/components/Switch.js @@ -5,13 +5,13 @@ import Checkbox from './Checkbox'; * a tick/cross one. */ export default class Switch extends Checkbox { - static initProps(props) { - super.initProps(props); + initAttrs(attrs) { + super.initAttrs(attrs); - props.className = (props.className || '') + ' Checkbox--switch'; + attrs.className = (attrs.className || '') + ' Checkbox--switch'; } getDisplay() { - return this.props.loading ? super.getDisplay() : ''; + return this.attrs.loading ? super.getDisplay() : ''; } }