mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +02:00
update: common/components/Switch
This commit is contained in:
committed by
Franz Liedke
parent
cfd1f01299
commit
71178245fc
@@ -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() : '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user