1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 18:07:02 +02:00

update: common/components/Switch

This commit is contained in:
David Sevilla Martin
2020-08-08 16:13:29 -04:00
committed by Franz Liedke
parent cfd1f01299
commit 71178245fc

View File

@@ -5,13 +5,13 @@ import Checkbox from './Checkbox';
* a tick/cross one. * a tick/cross one.
*/ */
export default class Switch extends Checkbox { export default class Switch extends Checkbox {
static initProps(props) { initAttrs(attrs) {
super.initProps(props); super.initAttrs(attrs);
props.className = (props.className || '') + ' Checkbox--switch'; attrs.className = (attrs.className || '') + ' Checkbox--switch';
} }
getDisplay() { getDisplay() {
return this.props.loading ? super.getDisplay() : ''; return this.attrs.loading ? super.getDisplay() : '';
} }
} }