feat: migrated to latest radix to improve performance / tree-shaking

This commit is contained in:
Hyteq
2025-06-23 09:06:42 +03:00
parent 79b8275bc0
commit 589f4a20a1
34 changed files with 251 additions and 255 deletions

View File

@ -1,5 +1,5 @@
import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { Slot as SlotPrimitive } from "radix-ui";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "../../lib/utils";
@ -42,7 +42,7 @@ export interface ButtonProps
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
const Comp = asChild ? SlotPrimitive.Slot : "button";
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}