@unicity/design-system
Version:
A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support
65 lines • 1.53 kB
TypeScript
import React from 'react';
import { SelectProps as MuiSelectProps } from '@mui/material';
export interface SelectOption {
value: string | number;
label: string;
disabled?: boolean;
divider?: boolean;
group?: string;
}
export interface SelectProps extends Omit<MuiSelectProps, 'value' | 'onChange'> {
/**
* The label for the select
*/
label?: string;
/**
* The options for the select
*/
options: SelectOption[];
/**
* The current value
*/
value?: string | number | string[] | number[];
/**
* Callback fired when the value changes
*/
onChange?: (value: string | number | string[] | number[]) => void;
/**
* Whether the field has an error
*/
error?: boolean;
/**
* Helper text to display below the select
*/
helperText?: string;
/**
* Whether the field is required
*/
required?: boolean;
/**
* Whether the field is disabled
*/
disabled?: boolean;
/**
* Whether the field takes full width
*/
fullWidth?: boolean;
/**
* The size of the select
*/
size?: 'small' | 'medium';
/**
* The variant of the select
*/
variant?: 'outlined' | 'filled' | 'standard';
/**
* Placeholder text when no value is selected
*/
placeholder?: string;
/**
* Whether multiple selection is enabled
*/
multiple?: boolean;
}
export declare const Select: React.FC<SelectProps>;
//# sourceMappingURL=Select.d.ts.map