UNPKG

@cainiaofe/cn-ui-m

Version:
41 lines (40 loc) 932 B
/// <reference types="react" /> import type { BasicComponentProps } from "../../../types"; export interface CnRadioProps extends Omit<BasicComponentProps, 'onChange'> { /** * 大小 */ size?: 'small' | 'medium' | 'large'; /** * 默认是否选中 */ defaultChecked?: boolean; /** * 是否选中,传入为受控模式 */ checked?: boolean; /** * 值改变时触发的回调函数 */ onChange?: (value: boolean, e: any) => void; /** * 是否禁用 */ disabled?: boolean; /** * 只读状态 */ readOnly?: boolean; /** * 选项文本,仅在CnRadioGroup中使用有效 */ text?: React.ReactNode; /** * 选项文本,优先级高于text,仅在CnRadioGroup中使用有效 */ label?: React.ReactNode; /** * 选项值,仅在CnRadioGroup中使用有效 */ value?: any; }