1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-23 03:05:49 +05:30

refactor: migrated to unified radix-ui package

This commit is contained in:
2026-02-13 14:15:20 +05:30
Verified
parent df48e54879
commit 15bd9c244f
28 changed files with 804 additions and 319 deletions

View File

@@ -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 { cva, VariantProps } from "class-variance-authority"
import { PanelLeftIcon } from "lucide-react"
@@ -414,7 +414,7 @@ function SidebarGroupLabel({
asChild = false,
...props
}: React.ComponentProps<"div"> & { asChild?: boolean }) {
const Comp = asChild ? Slot : "div"
const Comp = asChild ? SlotPrimitive.Slot : "div"
return (
<Comp
@@ -435,7 +435,7 @@ function SidebarGroupAction({
asChild = false,
...props
}: React.ComponentProps<"button"> & { asChild?: boolean }) {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? SlotPrimitive.Slot : "button"
return (
<Comp
@@ -524,7 +524,7 @@ function SidebarMenuButton({
isActive?: boolean
tooltip?: string | React.ComponentProps<typeof TooltipContent>
} & VariantProps<typeof sidebarMenuButtonVariants>) {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? SlotPrimitive.Slot : "button"
const { isMobile, state } = useSidebar()
const button = (
@@ -570,7 +570,7 @@ function SidebarMenuAction({
asChild?: boolean
showOnHover?: boolean
}) {
const Comp = asChild ? Slot : "button"
const Comp = asChild ? SlotPrimitive.Slot : "button"
return (
<Comp
@@ -693,7 +693,7 @@ function SidebarMenuSubButton({
size?: "sm" | "md"
isActive?: boolean
}) {
const Comp = asChild ? Slot : "a"
const Comp = asChild ? SlotPrimitive.Slot : "a"
return (
<Comp