1 | import { View } from '../core/view';
|
2 | import { Property } from '../core/properties';
|
3 | import { Color } from '../../color';
|
4 |
|
5 | /**
|
6 | * Represents a switch component.
|
7 | */
|
8 | export class Switch extends View {
|
9 | public static checkedChangeEvent: string;
|
10 |
|
11 | /**
|
12 | * Gets the native [android widget](http://developer.android.com/reference/android/widget/Switch.html) that represents the user interface for this component. Valid only when running on Android OS.
|
13 | */
|
14 | android: any /* android.widget.Switch */;
|
15 |
|
16 | /**
|
17 | * Gets the native iOS [UISwitch](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISwitch_Class/) that represents the user interface for this component. Valid only when running on iOS.
|
18 | */
|
19 | ios: any /* UISwitch */;
|
20 |
|
21 | /**
|
22 | * Gets or sets if a switch is checked or not.
|
23 | */
|
24 | checked: boolean;
|
25 |
|
26 | /**
|
27 | * Gets or sets the background color of the Switch when it is turned off.
|
28 | */
|
29 | offBackgroundColor: Color;
|
30 | }
|
31 |
|
32 | /**
|
33 | * Represents the observable property backing the checked property of each Switch instance.
|
34 | */
|
35 | export const checkedProperty: Property<Switch, boolean>;
|