"use client"; import { cn } from "@/lib/utils"; import { useId } from "react"; import Typography from "../Typography/Typography"; type Option = { value: string | number; label: string; }; export interface SelectInputProps extends React.ComponentProps<"select"> { error?: boolean; options: Option[]; placeholder?: string; label?: string; labelProps?: React.ComponentProps<"label">; errorProps?: React.ComponentProps; } export default function SelectInput({ error, options, placeholder, label, labelProps, errorProps, ...props }: SelectInputProps) { const id = useId(); return (
{label && ( )} {error && ( {errorProps?.children} )}
); }