Files
graff-mate-client/src/components/Select.tsx
T
2025-03-20 14:26:57 +05:00

29 lines
516 B
TypeScript

interface IOption {
id: string;
value: string;
}
interface ISelectProps<T extends IOption>
extends React.SelectHTMLAttributes<HTMLSelectElement> {
multiple?: boolean;
options: T[];
selected?: T;
// onClose: () => void;
}
export default function Select<T extends IOption>({
multiple,
options,
selected,
onClose,
...props
}: ISelectProps<T>) {
return (
<select {...props}>
{options.map(({ id, value }) => (
<option key={id}>{value}</option>
))}
</select>
);
}