UNPKG

@vonage/vivid-react

Version:

Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings

59 lines (58 loc) 3.4 kB
import React, { ReactNode, SyntheticEvent } from 'react'; /** VwcSwitch * For more info on this Vivid element please visit https://vivid.deno.dev/components/switch * @param {boolean} checked **attribute** `current-checked` * @param {boolean} readonly * @param {boolean} disabled **attribute** `disabled` * @param {string | undefined} value **attribute** `current-value` * @param {string | undefined} name **attribute** `name` * @param {string | undefined} label - Indicates the switch's label. **attribute** `label` * @param {SwitchConnotation | undefined} connotation - Indicates the switch's connotation. **attribute** `connotation` * @param {boolean} readOnly - When true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute for more information. **attribute** `readonly` * @param {boolean} checked - The current checkedness of the element. **attribute** `current-checked` * @param {'delegate'} _vividAriaBehaviour * @param {boolean} defaultChecked - The default checkedness of the element. This value sets the `checked` property only when the `checked` property has not been explicitly set. **attribute** `checked` * @param checkedAttribute * @param currentChecked * @param {string} value - The current value of the element. **attribute** `current-value` * @param currentValue * @param {string} initialValue - The default value of the element. This value sets the `value` property only when the `value` property has not been explicitly set. **attribute** `value` * @param {boolean} disabled - Sets the element's disabled state. A disabled element will not be included during form submission. **attribute** `disabled` * @param {string} name - The name of the element. This element's value will be surfaced during form submission under the provided name. **attribute** `name` * @param {boolean} required - Require the field to be completed prior to form submission. **attribute** `required` * @param {string} VIVID_VERSION - The current version of the Vivid library, which is useful for debugging. It can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`. * @param {string} componentName - Core component name, without prefix */ declare const VwcSwitch: { (props: { children?: ReactNode; slot?: string | undefined; id?: string | undefined; style?: React.CSSProperties | undefined; ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined; onChange?: ((event: SyntheticEvent) => void) | undefined; onClick?: ((event: SyntheticEvent) => void) | undefined; checked?: boolean | undefined; readonly?: boolean | undefined; disabled?: boolean | undefined; value?: string | undefined; name?: string | undefined; label?: string | undefined; connotation?: any; readOnly?: boolean | undefined; _vividAriaBehaviour?: any; defaultChecked?: boolean | undefined; checkedAttribute?: any; currentChecked?: any; currentValue?: any; initialValue?: string | undefined; required?: boolean | undefined; VIVID_VERSION?: string | undefined; componentName?: string | undefined; }): JSX.Element; displayName: string; }; export default VwcSwitch;