import React, { useState } from "react"; import { cn } from "@/lib/utils/cn"; interface SelectProps extends React.SelectHTMLAttributes { label?: string; error?: string; options: Array<{ value: string; label: string }>; } export const Select: React.FC = ({ label, error, options, className, ...props }) => { const [focused, setFocused] = useState(false); const hasValue = props.value !== undefined && props.value !== ""; return (
{label && ( )}
{/* Custom arrow */}
{(focused || hasValue) && !error && (
)}
{error && (

{error}

)}
); };