import { ElementType, MouseEvent } from 'react'; import { Color } from '../types.js'; import { SegmentedButtonProps } from './SegmentedButton.js'; import { SurfaceVariant } from './Surface.js'; interface ToggleButtonOwnProps { /** * Identifies this button inside a `ToggleGroup` - matched against the group's selection. * * Omit when using the button standalone. */ value?: string; /** Controlled pressed state for **standalone** use. Ignored inside a `ToggleGroup`. */ selected?: boolean; /** Initial pressed state for **standalone** use (uncontrolled). Ignored inside a `ToggleGroup`. */ defaultSelected?: boolean; /** * Fires with the next pressed state on click. Standalone only - inside a `ToggleGroup` use the group's `onValueChange` instead. */ onChange?: (selected: boolean, event: MouseEvent) => void; /** Accent color applied while **pressed**. Default: theme accent (or the group's `activeColor`). */ activeColor?: Color; /** `Surface` variant applied while **pressed**. Default `'gradient'`. */ activeVariant?: SurfaceVariant; /** Outline ring while **pressed**. Default `true`. */ activeOutline?: boolean; } export type ToggleButtonProps = ToggleButtonOwnProps & Omit, 'active' | keyof ToggleButtonOwnProps>; /** Shape of `ToggleButton` defaults that can be supplied via `CladdProvider`'s `defaults` prop. */ export type ToggleButtonDefaultProps = Partial>; /** * A two-state (pressed / not) button. Looks like a single `SegmentedButton` - * transparent when idle, accent gradient when pressed - and exposes * `aria-pressed`. * * Works both ways: * - **Inside a `ToggleGroup`**: identify it with `value`; the group owns the * selection and the button derives its pressed state and styling from it. * - **Standalone**: owns its own state (controlled via `selected`/`onChange` or * uncontrolled via `defaultSelected`) - handy for toolbar controls like * bold/italic/pin. */ export declare const ToggleButton: (props: ToggleButtonProps) => import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=ToggleButton.d.ts.map