UNPKG

@nami-ui/radio

Version:
19 lines (18 loc) 754 B
import { HTMLAttributes, ReactNode } from 'react'; import { RadioValue } from './radio-group-context'; import './radio-group.scss'; export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> { /** 所选选项值 */ value?: RadioValue; /** 默认所选选项值 */ defaultValue?: RadioValue; /** 选中选项改变事件 */ onChange?: (value: RadioValue | null) => void; /** 禁用 */ disabled?: boolean; /** 布局方向 */ direction: 'horizontal' | 'vertical'; /** 选项 */ children: ReactNode; } export declare function RadioGroup({ value, defaultValue, onChange, disabled, direction, className, children, ...otherProps }: RadioGroupProps): JSX.Element;