@useloops/design-system
Version:
The official React based Loops design system
41 lines (38 loc) • 1.47 kB
TypeScript
import { SelectProps as SelectProps$1, SelectChangeEvent, MenuItemProps } from '@mui/material';
import { ReactElement, FunctionComponent } from 'react';
import { SelectOption } from './StyledSelect.variant-helpers.js';
type SelectOnChange = (event: SelectChangeEvent<any>, child: React.ReactNode) => void;
type AutocompleteOnChange = (value: string | string[]) => void;
type SelectProps = {
selections: SelectOption[];
autoComplete?: boolean;
autoFocus?: boolean;
disabled?: boolean;
disablePortal?: boolean;
error?: boolean;
fullWidth?: boolean;
grouped?: boolean;
id?: string;
inputRef?: SelectProps$1['inputRef'];
internalChange?: () => void;
MenuProps?: SelectProps$1['MenuProps'];
multi?: boolean;
name: string;
onBlur?: SelectProps$1['onBlur'];
onChange?: SelectOnChange | AutocompleteOnChange;
placeholder?: string | undefined;
readOnly?: boolean;
ref?: SelectProps$1['ref'];
required?: boolean;
selectOptionProps?: MenuItemProps;
sizing?: 'xs' | 'md' | 'lg';
sx?: SelectProps$1['sx'];
onOpen?: SelectProps$1['onOpen'];
inputProps?: SelectProps$1['inputProps'];
value?: SelectProps$1['value'];
renderListItem?: (value: string, label: string) => ReactElement;
renderSelectedItem?: (value: string, label?: string) => ReactElement;
};
declare const Select: FunctionComponent<SelectProps>;
export { Select as default };
export type { SelectProps };