UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

89 lines (77 loc) 2.8 kB
/** * DevExtreme (ui/switch.d.ts) * Version: 21.1.4 * Build date: Mon Jun 21 2021 * * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement } from '../core/element'; import { EventInfo, NativeEventInfo, InitializedEventInfo, ChangedOptionInfo } from '../events/index'; import Editor, { ValueChangedInfo, EditorOptions } from './editor/editor'; export type ContentReadyEvent = EventInfo<dxSwitch>; export type DisposingEvent = EventInfo<dxSwitch>; export type InitializedEvent = InitializedEventInfo<dxSwitch>; export type OptionChangedEvent = EventInfo<dxSwitch> & ChangedOptionInfo; export type ValueChangedEvent = NativeEventInfo<dxSwitch> & ValueChangedInfo; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}. */ export interface dxSwitchOptions extends EditorOptions<dxSwitch> { /** * */ activeStateEnabled?: boolean; /** * */ focusStateEnabled?: boolean; /** * */ hoverStateEnabled?: boolean; /** * */ name?: string; /** * Specifies the text displayed when the UI component is switched off. */ switchedOffText?: string; /** * Specifies the text displayed when the UI component is switched on. */ switchedOnText?: string; /** * A Boolean value specifying whether the current switch state is &apos;On&apos; or &apos;Off&apos;. */ value?: boolean; } /** * The Switch is a UI component that can be in two states: &apos;On&apos; and &apos;Off&apos;. */ export default class dxSwitch extends Editor { constructor(element: UserDefinedElement, options?: dxSwitchOptions) } export type Properties = dxSwitchOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}. */ export type Options = dxSwitchOptions; /** * @deprecated use Properties instead * @deprecated Attention! This type is for internal purposes only. If you used it previously, please describe your scenario in the following GitHub Issue, and we will suggest a public alternative: {@link https://github.com/DevExpress/DevExtreme/issues/17885|Internal Types}. */ export type IOptions = dxSwitchOptions;