UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

58 lines (57 loc) 1.43 kB
import { default as React } from 'react'; import { RadioGroupOption } from '../radiogroup/types'; import { CheckboxDirection, CheckboxLabelPosition, CheckboxLimit } from './types'; export interface CheckboxGroupProps { /** * 是否禁用选择,将用于其下的全部复选框 * @default false */ disabled?: boolean /** * 当前选中项的标识符 * @default - */ value?: string[] /** * 初始选中项的标识符 * @default - */ defaultValue?: string[] /** * 列表模式 * @default false */ list: boolean /** * 限制最大可选数 * @default - */ max: number | undefined /** * 限制至少选择数 * @default - */ min: number | undefined /** * 文本所在的位置 * @default right */ labelPosition: CheckboxLabelPosition /** * 使用横纵方向 可选值 horizontal、vertical * @default vertical */ direction: CheckboxDirection /** * 配置 options 渲染复选按钮 * @default - */ options: RadioGroupOption[] /** * 值变化时触发 * @default - */ onChange: (value: string[]) => void onLimit: (type: CheckboxLimit) => void; } export declare const CheckboxGroup: React.ForwardRefExoticComponent<Partial<CheckboxGroupProps> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<unknown>>;