@ucloud-pccl/react-components
Version:
UCloud pccl react components
27 lines (26 loc) • 941 B
TypeScript
import React, { ReactNode } from 'react';
import { SelectedStatus } from 'src/hooks/selectable';
import { CheckboxProps } from './Checkbox';
import { Size, StyleType, Value } from './interface';
export interface GroupProps {
/** 当前值,controlled */
value?: Value[];
/** 默认值,uncontrolled */
defaultValue?: Value[];
/** 修改时的回调 */
onChange?: (value: Value[], selectedStatus: SelectedStatus) => void;
/** 快速定义选项 */
options?: ({
label: ReactNode;
} & CheckboxProps)[];
/** 禁用 */
disabled?: boolean;
/** 尺寸 */
size?: Size;
/** 样式风格 */
styleType?: StyleType;
/** @ignore */
children?: ReactNode;
}
declare const _default: React.MemoExoticComponent<({ value: _value, defaultValue, onChange: _onChange, options, disabled, size, styleType, children, ...rest }: GroupProps) => React.JSX.Element>;
export default _default;