1.1.0 • Published 4 months ago
@atmgrupomaggioli/iris-switch v1.1.0
iris-switch
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
checked | checked | Define si el switch está activado. | boolean | false |
disabled | disabled | Define si el switch está deshabilitado. | boolean | false |
label (required) | label | Texto descriptivo que acompaña al switch | string | undefined |
name | name | Nombre del switch - Se usa para identificar el switch en formularios. | string | undefined |
Events
| Event | Description | Type |
|---|---|---|
toggle | Se emite al cambiar el estado. | CustomEvent<{ checked: boolean; }> |
Methods
clear() => Promise<void>
Resetea el valor del switch.
Returns
Type: Promise<void>
getValue() => Promise<boolean>
Verifica si el switch está activado.
Returns
Type: Promise<boolean>
setValue(value: boolean) => Promise<void>
Establece el valor del switch.
Parameters
| Name | Type | Description |
|---|---|---|
value | boolean |
Returns
Type: Promise<void>
Built with StencilJS