UNPKG

@cainiaofe/cn-ui-m

Version:
60 lines (59 loc) 1.2 kB
/// <reference types="react" /> /** * common dateSource item */ export interface CnCheckboxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> { /** * 尺寸 */ size?: 'small' | 'medium' | 'large'; /** * 携带的标识值,用于 Group 模式 */ value?: any; /** * 指定当前是否选中 */ checked?: boolean; /** * 初始是否选中 */ defaultChecked?: boolean; /** * 是否禁用 */ disabled?: boolean; /** * 设置 indeterminate 状态,只负责样式控制 */ indeterminate?: boolean; /** * 初始 indeterminate 状态,只负责样式控制 */ defaultIndeterminate?: boolean; /** * 只读状态 */ readOnly?: boolean; /** * 自定义 icon 图标 */ checkIcon?: string; /** * 自定义 indeterminate 状态 icon */ indeterminateIcon?: string; /** * 变化时的回调函数 */ onChange?: (checked: boolean, e: any) => void; /** * 文本内容 * @ignore */ text?: React.ReactNode; /** * 标签内容 */ label?: React.ReactNode; }