"use client"; import { SelectHTMLAttributes, forwardRef } from "react"; interface SelectOption { value: string; label: string; } interface SelectProps extends SelectHTMLAttributes { label?: string; error?: string; helperText?: string; leftIcon?: string; options: SelectOption[]; placeholder?: string; } const Select = forwardRef( ( { label, error, helperText, leftIcon, options, placeholder, className = "", ...props }, ref ) => { return (
{label && ( )}
{leftIcon && ( )}
{helperText && !error && (

{helperText}

)} {error &&

{error}

}
); } ); Select.displayName = "Select"; export default Select;