mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Cleanup component models
This commit is contained in:
parent
536a9d20fd
commit
5748dea4bc
6 changed files with 71 additions and 105 deletions
|
|
@ -1,13 +1,10 @@
|
|||
import ko from 'ko';
|
||||
import { AbstractComponent } from 'Component/Abstract';
|
||||
|
||||
class AbstractCheckbox extends AbstractComponent {
|
||||
export class AbstractCheckbox {
|
||||
/**
|
||||
* @param {Object} params = {}
|
||||
*/
|
||||
constructor(params = {}) {
|
||||
super();
|
||||
|
||||
this.value = ko.isObservable(params.value) ? params.value
|
||||
: ko.observable(!!params.value);
|
||||
|
||||
|
|
@ -24,5 +21,3 @@ class AbstractCheckbox extends AbstractComponent {
|
|||
this.enable() && this.value(!this.value());
|
||||
}
|
||||
}
|
||||
|
||||
export { AbstractCheckbox };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue