summaryrefslogtreecommitdiff
path: root/apps/web/src/components/ui/sidebar.tsx
diff options
context:
space:
mode:
authorHyteq <DerpsDer.es@gmail.com>2025-06-23 09:06:42 +0300
committerHyteq <DerpsDer.es@gmail.com>2025-06-23 09:06:42 +0300
commit589f4a20a170c221203f7515622c38900e2efde4 (patch)
treed5108a909c976b598dc46d53fc6c6dbfd28e8068 /apps/web/src/components/ui/sidebar.tsx
parent79b8275bc0feef2aa32c95ca652d1160a3aeadbc (diff)
downloadopencut-589f4a20a170c221203f7515622c38900e2efde4.tar.gz
feat: migrated to latest radix to improve performance / tree-shaking
Diffstat (limited to 'apps/web/src/components/ui/sidebar.tsx')
-rw-r--r--apps/web/src/components/ui/sidebar.tsx12
1 files changed, 6 insertions, 6 deletions
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 (
<Comp
@@ -453,7 +453,7 @@ const SidebarGroupAction = React.forwardRef<
HTMLButtonElement,
React.ComponentProps<"button"> & { asChild?: boolean }
>(({ className, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button";
+ const Comp = asChild ? SlotPrimitive.Slot : "button";
return (
<Comp
@@ -553,7 +553,7 @@ const SidebarMenuButton = React.forwardRef<
},
ref
) => {
- 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 (
<Comp
@@ -713,7 +713,7 @@ const SidebarMenuSubButton = React.forwardRef<
isActive?: boolean;
}
>(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a";
+ const Comp = asChild ? SlotPrimitive.Slot : "a";
return (
<Comp