@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
21 lines (20 loc) • 1.22 kB
JavaScript
"use client";
import { jsx } from "react/jsx-runtime";
import { Indicator, Root } from "@radix-ui/react-checkbox";
import { Check } from "lucide-react";
import { forwardRef } from "react";
import { cn } from "../../lib/utilities.js";
const Checkbox = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
ref: ref,
className: cn("peer grid h-4 w-4 shrink-0 place-content-center rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900", className),
...props,
children: /*#__PURE__*/ jsx(Indicator, {
className: cn("grid place-content-center text-current"),
children: /*#__PURE__*/ jsx(Check, {
className: "h-4 w-4"
})
})
}));
Checkbox.displayName = Root.displayName;
export { Checkbox };
//# sourceMappingURL=checkbox.js.map