UNPKG

@szum-tech/design-system

Version:

Szum-Tech design system with tailwindcss support

33 lines (30 loc) 1.19 kB
import { cn } from './chunk-ZD2QRAOX.js'; import { CheckIcon } from 'lucide-react'; import { Checkbox as Checkbox$1 } from 'radix-ui'; import { jsx } from 'react/jsx-runtime'; function Checkbox({ className, ...props }) { return /* @__PURE__ */ jsx( Checkbox$1.Root, { "data-slot": "checkbox", className: cn( "peer border-input dark:bg-input/30 size-4 shrink-0 rounded border shadow-xs transition-shadow outline-none", "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary", "aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error", "disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", className ), ...props, children: /* @__PURE__ */ jsx( Checkbox$1.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" }) } ) } ); } export { Checkbox };