@wulperstudio/cms
Version:
Wulper Studio Library Components CMS
29 lines (28 loc) • 1.07 kB
TypeScript
import React, { ReactNode } from 'react';
import { GetValueMultiple, InputVariantType } from '../../types';
import { Root, WrapperBody } from './styled';
import { InputLabel } from '../../base';
export type BaseGroupOptionsType = {
id: string;
children?: ReactNode;
contentTooltip?: ReactNode;
isDisabled?: boolean;
};
export type InputBoxGroupModel<T extends BaseGroupOptionsType, Multiple extends boolean | undefined = false> = {
multiple?: Multiple;
value?: GetValueMultiple<T, Multiple> | null;
onChange?: (element?: GetValueMultiple<T, Multiple> | null) => void;
defaultValue?: GetValueMultiple<T, Multiple> | null;
options: T[];
variant?: InputVariantType;
label?: string;
backgroundColor?: string;
sizeElement?: 'small' | 'medium' | 'large';
borderColor?: string;
isTooltip?: boolean;
slots?: {
root?: React.ComponentPropsWithRef<typeof Root>;
label?: React.ComponentPropsWithRef<typeof InputLabel>;
wrapperBody?: React.ComponentPropsWithRef<typeof WrapperBody>;
};
};