import { cva, type VariantProps } from "class-variance-authority"; import type { ComponentProps } from "react"; import { forwardRef, memo, useId } from "react"; const checkboxVariants = cva( "outline-0 focus:ring-0 mr-2 cursor-pointer rounded transition duration-200 dark:text-gray-500", { defaultVariants: { disabled: false }, variants: { disabled: { false: "", true: "cursor-not-allowed opacity-50" } } } ); interface CheckboxProps extends Omit, "prefix" | "disabled">, VariantProps { className?: string; label?: string; } const Checkbox = forwardRef( ({ className = "", label, disabled, ...props }, ref) => { const id = useId(); return (
); } ); export default memo(Checkbox);