UNPKG

wix-style-react

Version:
30 lines 1.36 kB
import * as React from 'react'; import { TooltipCommonProps } from '../common'; import { ValuesOf } from '../utils/typeUtils'; import { SIZE, SKIN } from './constants'; export type CheckToggleSize = ValuesOf<typeof SIZE>; export type CheckToggleSkin = ValuesOf<typeof SKIN>; export interface CheckToggleProps { /** Applies a data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** Specifies a CSS class name to be appended to the component’s root element */ className?: string; /** Specifies whether a check is selected */ checked?: boolean; /** Defines a callback function which is called every time the check value is changed */ onChange?: React.ChangeEventHandler<HTMLInputElement>; /** Specifies whether toggle interactions should be disabled */ disabled?: boolean; /** Controls the size of the component */ size?: CheckToggleSize; /** Controls the skin of the component */ skin?: CheckToggleSkin; /** Defines a message to be displayed in a tooltip. Tooltip is displayed on component hover. */ tooltipContent?: React.ReactNode; /** Allows to pass all common tooltip props. * @linkTypeTo components-overlays--tooltip * @setTypeName TooltipCommonProps */ tooltipProps?: TooltipCommonProps; } //# sourceMappingURL=CheckToggle.types.d.ts.map