UNPKG

@trail-ui/react

Version:
36 lines (33 loc) 1.29 kB
import { RadioProps } from './radio.js'; import * as react from 'react'; import { ReactNode } from 'react'; import { SlotsToClasses, RadioGroupSlots, RadioVariantProps } from '@trail-ui/theme'; import { RadioGroupProps as RadioGroupProps$1 } from 'react-aria-components'; interface RadioGroupProps extends RadioGroupProps$1, Partial<Pick<RadioProps, 'color' | 'size' | 'isDisabled'>> { label?: ReactNode; description?: string; errorMessage?: string; /** * Classname or List of classes to change the classNames of the element. * if `className` is passed, it will be added to the base slot. * * @example * ```ts * <RadioGroup classNames={{ * base:"base-classes", * label: "label-classes", * wrapper: "wrapper-classes" * }} > * // radio * </RadioGroup> * ``` */ classNames?: SlotsToClasses<RadioGroupSlots>; className?: string; } declare const RadioGroupThemeContext: react.Context<RadioVariantProps>; /** * A radio group allows a user to select multiple items from a list of options. */ declare const _RadioGroup: react.ForwardRefExoticComponent<RadioGroupProps & react.RefAttributes<HTMLDivElement>>; export { _RadioGroup as RadioGroup, RadioGroupProps, RadioGroupThemeContext };