mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
Rename CheckboxMaterialDesignComponent to CheckboxComponent
This commit is contained in:
parent
74f830486e
commit
1edc5fa4f7
3 changed files with 5 additions and 6 deletions
18
dev/Component/Checkbox.js
Normal file
18
dev/Component/Checkbox.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export class CheckboxComponent {
|
||||
constructor(params = {}) {
|
||||
this.value = ko.isObservable(params.value) ? params.value
|
||||
: ko.observable(!!params.value);
|
||||
|
||||
this.enable = ko.isObservable(params.enable) ? params.enable
|
||||
: ko.observable(undefined === params.enable || !!params.enable);
|
||||
|
||||
this.label = params.label;
|
||||
this.inline = params.inline;
|
||||
|
||||
this.labeled = null != params.label;
|
||||
}
|
||||
|
||||
click() {
|
||||
this.enable() && this.value(!this.value());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue