import Checkbox from 'nes-design/es/Checkbox'; OR import { Checkbox } from 'nes-design';| Prop / 参数 | Description / 描述 | Type / 类型 | Default / 默认值 |
|---|---|---|---|
| theme | theme / 主题 | 'dark' | - |
| name | input name | string | - |
| disabled | disabled choose / 禁止选择 | boolean | - / false |
| Prop / 参数 | Description / 描述 | Type / 类型 | Default / 默认值 |
|---|---|---|---|
| value | choose values / 选择的值 | string[] | - |
| defaultValue | default values / 默认选中的值 | string[] | - |
| options | checkbox option /单选选项组 | Option[] | - |
| onChange | change callback / 值改变后回调 | (checkedValues: string[]) => void | - |
| ...rest | more attrs(Example: global attr) / 更多属性(举例: 全局属性) | React.HTMLAttributes<HTMLDivElement> | - |
| Prop / 参数 | Description / 描述 | Type / 类型 | Default / 默认值 |
|---|---|---|---|
| value | checkbox input value / Checkbox Input 的 Value,配合 CheckboxGroup 使用 | string | - |
| defaultChecked | default checked / 初始是否选中 | boolean | - |
| onChange | change callback / 值改变后回调 | (e: React.ChangeEvent<HTMLInputElement>) => void | - |
| labelProps | box label props / 外层 label 的属性控制 | React.HTMLAttributes<HTMLLabelElement> | - |
| ...rest | more attrs(Example: onBlur onFocus) / 更多属性(Example: onBlur | onFocus | React.InputHTMLAttributes<HTMLInputElement> | - |
| Prop / 参数 | Description / 描述 | Type / 类型 | Default / 默认值 |
|---|---|---|---|
| label | Checkbox children / 展示的名称 | string | - |
| ...Checkbox | Checkbox attrs / Checkbox 属性 | CheckboxProps | - |