mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-23 14:59:24 +01:00
* chore: shadcn config * feat: add shadcn ui config * style: adjust styles * style: adjust styles * refactor: update style * style: adjust styles * style: adjust styles * style: adjust styles * style: adjust styles * refactor: update * refactor: update * refactor: update * refactor: update * style: adjust styles * style: adjust styles * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * style: web styles * refactor: update * style: web styles * style: web styles * refactor: update * refactor: update * refactor: update * chhore: add * chore: add * refactor: update * refactor: update * refactor: update * refactor: update * chore: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * chore: rename * refactor: update * refactor: update * chore: add * refactor: update * chore: update * chroe: up * refactor: update * refactor: update * chore: up * refactor: update * chore: up * feat: support for extracting css variables * chore: update * fix: fixed dark mode * refactor: update * refactor: update * refactor: update * refactor: update * docs: update release notes * style: adjust styles * style: adjust styles * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update * refactor: update --------- Co-authored-by: ayang <473033518@qq.com>
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import * as React from "react";
|
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
import { Check } from "lucide-react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
const Checkbox = React.forwardRef<
|
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>
|
|
>(({ className, ...props }, ref) => (
|
|
<CheckboxPrimitive.Root
|
|
ref={ref}
|
|
className={cn(
|
|
"peer h-4 w-4 shrink-0 rounded-sm border border-input bg-background shadow ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<CheckboxPrimitive.Indicator className="flex items-center justify-center text-primary-foreground">
|
|
<Check className="h-3.5 w-3.5" />
|
|
</CheckboxPrimitive.Indicator>
|
|
</CheckboxPrimitive.Root>
|
|
));
|
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
|
|
export { Checkbox };
|