fictoan-react
Version:
A full-featured, designer-friendly, yet performant framework with plain-English props and focus on rapid iteration.
35 lines (34 loc) • 1.13 kB
TypeScript
import React from "react";
import { ColourPropTypes, CommonAndHTMLProps } from '../../Element/constants';
type NonZeroNumber = Exclude<number, 0>;
export type ListBoxElementType = HTMLDivElement;
export interface OptionForListBoxProps {
value: string;
label: string;
customLabel?: React.ReactNode;
disabled?: boolean;
}
export interface ListBoxCustomProps {
options?: OptionForListBoxProps[];
label?: string;
helpText?: string;
errorText?: string;
allowMultiSelect?: boolean;
disabled?: boolean;
placeholder?: string;
id?: string;
defaultValue?: string;
badgeBgColour?: ColourPropTypes;
badgeBgColor?: ColourPropTypes;
badgeTextColour?: ColourPropTypes;
badgeTextColor?: ColourPropTypes;
selectionLimit?: NonZeroNumber;
allowCustomEntries?: boolean;
isLoading?: boolean;
onChange?: (value: string | string[]) => void;
value?: string | string[];
isFullWidth?: boolean;
}
export type ListBoxProps = Omit<CommonAndHTMLProps<ListBoxElementType>, keyof ListBoxCustomProps> & ListBoxCustomProps;
export {};
//# sourceMappingURL=constants.d.ts.map