22 lines
567 B
TypeScript
22 lines
567 B
TypeScript
import { forwardRef, SelectHTMLAttributes } from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
export const Select = forwardRef<HTMLSelectElement, SelectHTMLAttributes<HTMLSelectElement>>(function Select(
|
|
{ className, children, ...props },
|
|
ref
|
|
) {
|
|
return (
|
|
<select
|
|
ref={ref}
|
|
className={cn(
|
|
"ui-control",
|
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/70 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</select>
|
|
);
|
|
});
|