From 589f4a20a170c221203f7515622c38900e2efde4 Mon Sep 17 00:00:00 2001 From: Hyteq Date: Mon, 23 Jun 2025 09:06:42 +0300 Subject: feat: migrated to latest radix to improve performance / tree-shaking --- apps/web/src/components/ui/sidebar.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/web/src/components/ui/sidebar.tsx') diff --git a/apps/web/src/components/ui/sidebar.tsx b/apps/web/src/components/ui/sidebar.tsx index 53902fbe..e69d8751 100644 --- a/apps/web/src/components/ui/sidebar.tsx +++ b/apps/web/src/components/ui/sidebar.tsx @@ -1,7 +1,7 @@ "use client"; import * as React from "react"; -import { Slot } from "@radix-ui/react-slot"; +import { Slot as SlotPrimitive } from "radix-ui"; import { VariantProps, cva } from "class-variance-authority"; import { PanelLeft } from "lucide-react"; @@ -432,7 +432,7 @@ const SidebarGroupLabel = React.forwardRef< HTMLDivElement, React.ComponentProps<"div"> & { asChild?: boolean } >(({ className, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "div"; + const Comp = asChild ? SlotPrimitive.Slot : "div"; return ( & { asChild?: boolean } >(({ className, asChild = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? SlotPrimitive.Slot : "button"; return ( { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? SlotPrimitive.Slot : "button"; const { isMobile, state } = useSidebar(); const button = ( @@ -599,7 +599,7 @@ const SidebarMenuAction = React.forwardRef< showOnHover?: boolean; } >(({ className, asChild = false, showOnHover = false, ...props }, ref) => { - const Comp = asChild ? Slot : "button"; + const Comp = asChild ? SlotPrimitive.Slot : "button"; return ( (({ asChild = false, size = "md", isActive, className, ...props }, ref) => { - const Comp = asChild ? Slot : "a"; + const Comp = asChild ? SlotPrimitive.Slot : "a"; return (