-
Notifications
You must be signed in to change notification settings - Fork 153
/
Copy pathswitch-model.d.ts
92 lines (79 loc) · 2.69 KB
/
switch-model.d.ts
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { Component, INotifyPropertyChanged, NotifyPropertyChanges, Property, closest, setValue } from '@syncfusion/ej2-base';import { EmitType, Event, EventHandler, MouseEventArgs } from '@syncfusion/ej2-base';import { addClass, isRippleEnabled, removeClass, rippleEffect, isNullOrUndefined } from '@syncfusion/ej2-base';import { rippleMouseHandler, destroy, preRender, ChangeEventArgs, BeforeChangeEventArgs, setHiddenInput } from './../common/common';
import {ComponentModel} from '@syncfusion/ej2-base';
/**
* Interface for a class Switch
*/
export interface SwitchModel extends ComponentModel{
/**
* This event is triggered before the state of the switch is changed in the Switch component.
* @event beforeChange
* @remarks
* The `beforeChange` event allows developers to intercept and cancel the switch state change before it is applied.
*/
beforeChange?: EmitType<BeforeChangeEventArgs>;
/**
* Triggers when Switch state has been changed by user interaction.
*
* @event change
*/
change?: EmitType<ChangeEventArgs>;
/**
* Triggers once the component rendering is completed.
*
* @event created
*/
created?: EmitType<Event>;
/**
* Specifies a value that indicates whether the Switch is `checked` or not.
* When set to `true`, the Switch will be in `checked` state.
*
* @default false
*/
checked?: boolean;
/**
* You can add custom styles to the Switch by using this property.
*
* @default ''
*/
cssClass?: string;
/**
* Specifies a value that indicates whether the Switch is `disabled` or not.
* When set to `true`, the Switch will be in `disabled` state.
*
* @default false
*/
disabled?: boolean;
/**
* Defines `name` attribute for the Switch.
* It is used to reference form data (Switch value) after a form is submitted.
*
* @default ''
*/
name?: string;
/**
* Specifies a text that indicates the Switch is in checked state.
*
* @default ''
*/
onLabel?: string;
/**
* Specifies a text that indicates the Switch is in unchecked state.
*
* @default ''
*/
offLabel?: string;
/**
* Defines `value` attribute for the Switch.
* It is a form data passed to the server when submitting the form.
*
* @default ''
*/
value?: string;
/**
* You can add the additional html attributes such as disabled, value etc., to the element.
* If you configured both property and equivalent html attribute then the component considers the property value.
*
* @default {}
*/
htmlAttributes?: { [key: string]: string; };
}