UNPKG

mobile-more

Version:

基于 antd-mobile v5 扩展移动端 UI 组件

40 lines (39 loc) 1.26 kB
import React from 'react'; import { CheckboxGroupProps, CheckboxProps, SpaceProps } from 'antd-mobile'; type Option = { label?: React.ReactNode; value?: CheckboxProps['value']; disabled?: boolean; [key: string]: any; }; export interface SuperCheckboxProps extends Pick<CheckboxProps, 'block' | 'icon'> { /** * @description 可选项。 */ options: Option[]; /** * @description 自定义 `label` `value` `disabled` 字段名。 */ fieldNames?: { label?: string; value?: string; disabled?: string; }; /** * @description 透传 Space 组件属性。 * @see {@link https://mobile.ant.design/zh/components/space#属性|SpaceProps} */ spaceProps?: SpaceProps; /** * @description 透传 Checkbox 组件属性。 * @see {@link https://mobile.ant.design/zh/components/checkbox#checkbox|CheckboxProps} */ checkboxProps?: CheckboxProps; /** * @description 透传 Checkbox.Group 组件属性。 * @see {@link https://mobile.ant.design/zh/components/checkbox#checkboxgroup|CheckboxGroupProps} */ checkboxGroupProps?: CheckboxGroupProps; } declare const SuperCheckbox: React.FC<SuperCheckboxProps>; export default SuperCheckbox;