import React, { useId } from 'react'; import styles from './Select.module.css'; export interface SelectOption { value: string; label: string; disabled?: boolean; } export interface SelectProps extends Omit, 'id'> { label?: string; hint?: string; error?: string; options: SelectOption[]; placeholder?: string; } export function Select({ label, hint, error, options, placeholder, className, ...props }: SelectProps) { const id = useId(); return (
{label && ( )}
{error ? ( {error} ) : hint ? ( {hint} ) : null}
); }