| 123456789101112131415161718192021222324 |
- import * as React from "react";
- import { cn } from "@/lib/utils";
- export function Select({
- className,
- options,
- ...props
- }: React.SelectHTMLAttributes<HTMLSelectElement> & { options: Array<{ value: string; label: string }> }) {
- return (
- <select
- className={cn(
- "h-11 w-full rounded-md border border-border bg-surface-elevated px-3 text-base text-foreground outline-none focus:border-primary/70 focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:text-sm",
- className,
- )}
- {...props}
- >
- {options.map((option) => (
- <option key={option.value} value={option.value}>
- {option.label}
- </option>
- ))}
- </select>
- );
- }
|