@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS
40 lines (35 loc) • 1.63 kB
TypeScript
import { V as Variants } from '../../../Toggle.constants-CdYGwS01.js';
import * as react_jsx_runtime from 'react/jsx-runtime';
import { ToggleGroupMultipleProps, ToggleGroupItemProps as ToggleGroupItemProps$1 } from '@radix-ui/react-toggle-group';
import * as react from 'react';
import { ReactNode } from 'react';
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;
}
declare const ToggleGroup: {
({ children, defaultValue, disabled, fullWidth, grouped, label, multiple, onValueChange, orientation, value, variant, ...props }: ToggleGroupProps): react_jsx_runtime.JSX.Element;
displayName: string;
};
declare const ToggleGroupItem: react.ForwardRefExoticComponent<ToggleGroupItemProps & react.RefAttributes<HTMLButtonElement | null>>;
export { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, Variants as ToggleGroupVariants };