diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index 8402149..f8d7c30 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx @@ -1,28 +1,50 @@ import { cn } from '@/lib/utils'; -import { SelectHTMLAttributes } from 'react'; +import { Loader2, ChevronDown } from 'lucide-react'; +import { SelectHTMLAttributes, forwardRef } from 'react'; interface SelectProps extends SelectHTMLAttributes { options: { value: string; label: string; disabled?: boolean }[]; + loading?: boolean; } -export const Select = ({ className, options, ...restProps }: SelectProps) => { - return ( - - ); -}; +export const Select = forwardRef( + ({ className, options, loading = false, disabled, ...restProps }, ref) => { + return ( +
+ + + {loading ? ( + + ) : ( + + )} + +
+ ); + }, +); + +Select.displayName = 'Select'; export default Select;