UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

31 lines (28 loc) 1.08 kB
import { ToggleGroupMultipleProps, ToggleGroupItemProps as ToggleGroupItemProps$1 } from '@radix-ui/react-toggle-group'; import { ReactNode } from 'react'; import { Variants } from '../Toggle/Toggle.constants.js'; interface ToggleGroupProps extends Omit<ToggleGroupMultipleProps, 'defaultValue' | 'type' | 'value'> { children: ReactNode; defaultValue?: string | Array<string>; disabled?: boolean; fullWidth?: boolean; grouped?: boolean; label?: string; multiple?: boolean; orientation?: ToggleGroupMultipleProps['orientation']; value?: string | Array<string>; variant?: `${Variants}`; onValueChange?: (value: string | Array<string>) => void; } interface ToggleGroupItemProps extends Omit<ToggleGroupItemProps$1, 'onToggle'> { value: string; children?: ReactNode; disabled?: boolean; fullWidth?: boolean; icon?: ReactNode; iconOnly?: boolean; label?: ReactNode; labelElement?: keyof HTMLElementTagNameMap; onToggle?: (toggled: boolean) => void; } export type { ToggleGroupItemProps, ToggleGroupProps };