import React, { FC, ChangeEvent, FocusEvent, ReactNode } from 'react'; import { ResponsiveProp } from '../../types'; export declare type ToggleSize = 'sm' | 'md' | 'lg'; export interface ToggleProps { /** * The id attribute of the input. */ id: string; /** * The toggle input "checked" attribute. */ isChecked: boolean; /** * Custom content to be displayed to right of toggle. */ label: string; /** * Callback function when input is changed. */ onChange: (event: ChangeEvent) => void; /** * Additional classes to add. */ className?: string; /** * Mark the input field as invalid and display a validation message. * Pass a string or node to render a validation message below the input. */ error?: ReactNode; /** * Additional clarifying text to help describe the input */ helpText?: ReactNode; /** * Determines if the label is not shown for stylistic reasons. * Note the label is still a required prop and will be used as the aria-label for accessibility reasons. */ hideLabel?: boolean; /** * If the input should be disabled and not focusable. */ isDisabled?: boolean; /** * The required and aria-required attributes on the input */ isRequired?: boolean; /** * Callback function when input is blurred. */ onBlur?: (event: FocusEvent) => void; /** * Callback function when input is focused. */ onFocus?: (event: FocusEvent) => void; /** * Visual indicator that the field is required, that gets appended to the label */ requiredIndicator?: React.ReactNode; /** * The size of the toggle. */ size?: ToggleSize | ResponsiveProp; } export declare const Toggle: FC;