import React from "react"; import clsx from "clsx"; import FieldLabel from "@/components/FieldLabel"; import { cva } from "@/cva.config"; import Card from "./Card"; type SelectMenuProps = Pick< JSX.IntrinsicElements["select"], "disabled" | "onChange" | "name" | "value" > & { defaultSelection?: string; className?: string; options: { label: string; value: string; disabled?: boolean; }[]; size?: keyof typeof sizes; direction?: "vertical" | "horizontal"; error?: string; fullWidth?: boolean; } & Partial>; const sizes = { XS: "h-[24.5px] pl-3 pr-8 text-xs", SM: "h-[32px] pl-3 pr-8 text-[13px]", SM_Wide: "h-[32px] pl-3 pr-8 mr-5 text-[13px]", MD: "h-[40px] pl-4 pr-10 text-sm", LG: "h-[48px] pl-4 pr-10 px-5 text-base", }; const selectMenuVariants = cva({ variants: { size: sizes }, }); export const SelectMenuBasic = React.forwardRef( function SelectMenuBasic( { fullWidth, options, className, direction = "vertical", label, size = "MD", name, disabled, value, id, onChange, }, ref, ) { const classes = selectMenuVariants({ size }); return (
{label && }
); }, );