MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / Checkbox

Function Checkbox

packages/react/src/components/checkbox.tsx:9–27  ·  view source on GitHub ↗
({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>)

Source from the content-addressed store, hash-verified

7import { cn } from "../lib/utils";
8
9function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
10 return (
11 <CheckboxPrimitive.Root
12 data-slot="checkbox"
13 className={cn(
14 "peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
15 className,
16 )}
17 {...props}
18 >
19 <CheckboxPrimitive.Indicator
20 data-slot="checkbox-indicator"
21 className="grid place-content-center text-current transition-none"
22 >
23 <CheckIcon className="size-3.5" />
24 </CheckboxPrimitive.Indicator>
25 </CheckboxPrimitive.Root>
26 );
27}
28
29export { Checkbox };

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected