mirror of
https://github.com/flarum/core.git
synced 2025-08-08 09:26:34 +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.
|
||||
*/
|
||||
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() : '';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user