Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | 93x 93x 93x 2x 93x | import { InputFactory } from '../zd-input/input-factory';
import { Toggleable } from '../zd-toggleable/toggleable';
import { ISwitch } from './interfaces';
/**
* Base class for Switch component.
*/
export class Switch extends Toggleable implements ISwitch {
/**
* It can make switch render in inset mode.
*/
public inset = false;
/* istanbul ignore next */
/**
* Create a new Switch.
* @param props Switch properties
*/
constructor(props: ISwitch) {
super(props);
this.inset = this.getInitValue('inset', props.inset, this.inset);
this.createAccessors();
}
}
InputFactory.register('ZdSwitch', Switch);
|