UNPKG

@wix/design-system

Version:

@wix/design-system

46 lines 1.49 kB
import React, { PureComponent } from 'react'; import { InjectedFocusableProps } from '../common/Focusable'; import { CheckToggleProps } from '.'; /** CheckToggle */ export declare class CheckToggle extends PureComponent<InjectedFocusableProps<CheckToggleProps, HTMLLabelElement>> { static displayName: string; static defaultProps: CheckToggleProps; state: { checked: boolean; }; /** * Checks if the component is controlled or uncontrolled. * The component is controlled only if prop checked is provided. * * @returns boolean * @private */ _isControlled: () => boolean; /** * Toggles checked state and triggers the onChange callback. * Except when disabled */ _handleChange: (changeEvent: React.ChangeEvent<HTMLInputElement>) => void; /** * Renders the toggle itself * @returns React.ReactNode * @private */ _renderInput: (iconMap: { small: JSX.Element; medium: JSX.Element; }) => React.JSX.Element | null; /** * Renders a tooltip wrapper * @returns React.ReactNode * @private */ _renderTooltip: (iconMap: { small: JSX.Element; medium: JSX.Element; }) => React.JSX.Element; render(): React.JSX.Element; } declare const _default: React.ComponentType<CheckToggleProps & import("../common/Focusable").WithFocusableProps<HTMLLabelElement>>; export default _default; //# sourceMappingURL=CheckToggle.d.ts.map