@trail-ui/react
Version:
33 lines (30 loc) • 1.08 kB
TypeScript
import * as react from 'react';
import { ReactNode } from 'react';
import { RadioVariantProps, SlotsToClasses, RadioSlots } from '@trail-ui/theme';
import { RadioProps as RadioProps$1 } from 'react-aria-components';
interface RadioIconProps {
'data-checked'?: string;
isSelected?: boolean;
className?: string;
}
interface RadioProps extends RadioProps$1, RadioVariantProps {
/**
* The content to be displayed as the radio control.
*/
control?: ReactNode | ((props: RadioIconProps) => ReactNode);
/**
* Whether the radio control should be displayed.
*/
isDisplayControl?: boolean;
/**
* Classes object to style the radio and its children.
*/
classNames?: SlotsToClasses<RadioSlots>;
className?: string;
}
/**
* A checkbox allows a user to select multiple items from a list of individual items, or
* to mark one individual item as selected.
*/
declare const _Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLLabelElement>>;
export { _Radio as Radio, RadioIconProps, RadioProps };