mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
ab6c03c0cc
- Use JSX for templates - Docblock/comment everything - Mostly passes ESLint (still some work to do) - Lots of renaming, refactoring, etc. CSS hasn't been updated yet.
18 lines
342 B
JavaScript
18 lines
342 B
JavaScript
import Checkbox from 'flarum/components/Checkbox';
|
|
|
|
/**
|
|
* The `Switch` component is a `Checkbox`, but with a switch display instead of
|
|
* a tick/cross one.
|
|
*/
|
|
export default class Switch extends Checkbox {
|
|
static initProps(props) {
|
|
super.initProps(props);
|
|
|
|
props.className += ' switch';
|
|
}
|
|
|
|
getDisplay() {
|
|
return '';
|
|
}
|
|
}
|