import React, { ReactElement } from 'react'; import '../../styles/base.module.css'; import { Tooltip, TooltipProps } from '../tooltip/Tooltip'; import { AllElementPropsWithRef } from '../../utils/elementTypings'; export type ToggleButtonVariant = 'default' | 'inline'; export interface ToggleButtonCustomTheme { '--toggle-button-color'?: string; '--toggle-button-hover-color'?: string; } export type ToggleButtonProps = AllElementPropsWithRef<'button'> & { /** * The id of the button element */ id: string; /** * The label for the input */ label: string | React.ReactNode; /** * The state of the toggle button */ checked: boolean; /** * If `true`, the button will be disabled */ disabled?: boolean; /** * Callback fired when the toggle button is clicked. Should switch the value. */ onChange: (boolean: any) => void; /** * Tooltip */ tooltip?: ReactElement; /** * Defines the toggle button variant */ variant?: ToggleButtonVariant; /** * Custom theme styles */ theme?: ToggleButtonCustomTheme; }; export declare const ToggleButton: ({ id, label, checked, disabled, onChange, tooltip, variant, theme, className, ref, ...rest }: ToggleButtonProps) => React.JSX.Element;