This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-js/lib/src/widget/switch.d.ts

27 lines
686 B
TypeScript
Raw Normal View History

2020-03-13 13:01:21 +08:00
import { View, IView } from "../ui/view";
import { Color } from "../util/color";
export interface ISwitch extends IView {
/**
* True is on ,false is off,defalut is off.
*/
state?: boolean;
/**
* Switch change callback
*/
onSwitch?: (state: boolean) => void;
onTintColor?: Color;
offTintColor?: Color;
thumbTintColor?: Color;
}
export declare class Switch extends View {
/**
* True is on ,false is off,defalut is off.
*/
state?: boolean;
onSwitch?: (state: boolean) => void;
offTintColor?: Color;
onTintColor?: Color;
thumbTintColor?: Color;
}
export declare function switchView(config: ISwitch): Switch;