fictoan-react
Version:
A full-featured, designer-friendly, yet performant framework with plain-English props and focus on rapid iteration.
27 lines (26 loc) • 1.27 kB
TypeScript
import React from "react";
import { CheckboxProps } from './Checkbox';
import { SwitchProps } from './Switch';
import { BaseInputComponentProps } from '../BaseInputComponent/constants';
interface BaseGroupOptionProps {
id: string;
label: string;
value: string;
}
type ExcludedInputProps = "onChange" | "checked" | "name";
type InputGroupOptionProps<T> = BaseGroupOptionProps & Omit<T, ExcludedInputProps>;
interface GroupCustomProps<T> {
name: string;
options: InputGroupOptionProps<T>[];
value?: string[];
defaultValue?: string[];
onChange?: (values: string[]) => void;
align?: "horizontal" | "vertical";
equaliseWidth?: boolean;
equalizeWidth?: boolean;
}
export type InputGroupProps<T> = Omit<BaseInputComponentProps<HTMLDivElement>, "value"> & GroupCustomProps<T>;
export declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<BaseInputComponentProps<HTMLDivElement>, "value"> & GroupCustomProps<CheckboxProps> & React.RefAttributes<HTMLDivElement>>;
export declare const SwitchGroup: React.ForwardRefExoticComponent<Omit<BaseInputComponentProps<HTMLDivElement>, "value"> & GroupCustomProps<SwitchProps> & React.RefAttributes<HTMLDivElement>>;
export {};
//# sourceMappingURL=CheckboxAndSwitchGroup.d.ts.map