diff --git a/components/ui/sidebar/Sidebar.tsx b/components/ui/sidebar/Sidebar.tsx index 49df2deac7..3a677ea20e 100644 --- a/components/ui/sidebar/Sidebar.tsx +++ b/components/ui/sidebar/Sidebar.tsx @@ -14,10 +14,9 @@ import { ListboxSection, Tooltip, } from "@nextui-org/react"; +import clsx from "clsx"; import React from "react"; -import { cn } from "@/utils/cn"; - export enum SidebarItemType { Nest = "nest", } @@ -67,20 +66,20 @@ const Sidebar = React.forwardRef( const sectionClasses = { ...sectionClassesProp, - base: cn(sectionClassesProp?.base, "w-full", { + base: clsx(sectionClassesProp?.base, "w-full", { "p-0 max-w-[44px]": isCompact, }), - group: cn(sectionClassesProp?.group, { + group: clsx(sectionClassesProp?.group, { "flex flex-col gap-1": isCompact, }), - heading: cn(sectionClassesProp?.heading, { + heading: clsx(sectionClassesProp?.heading, { hidden: isCompact, }), }; const itemClasses = { ...itemClassesProp, - base: cn(itemClassesProp?.base, { + base: clsx(itemClassesProp?.base, { "w-11 h-11 gap-0 p-0": isCompact, }), }; @@ -102,7 +101,7 @@ const Sidebar = React.forwardRef( {...item} key={item.key} classNames={{ - base: cn( + base: clsx( { "h-auto p-0": !isCompact && isNestType, }, @@ -119,7 +118,7 @@ const Sidebar = React.forwardRef( startContent={ isCompact || isNestType ? null : item.icon ? ( (
{item.icon ? ( ( className={"flex h-11 items-center gap-2 px-2 py-1.5"} > ( ( startContent={ isCompact ? null : item.icon ? ( (
{item.icon ? ( ( ref={ref} hideSelectedIcon as="nav" - className={cn("list-none", className)} + className={clsx("list-none", className)} classNames={{ ...classNames, - list: cn("items-center", classNames?.list), + list: clsx("items-center", classNames?.list), }} color="default" itemClasses={{ ...itemClasses, - base: cn( + base: clsx( "px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-default-100", itemClasses?.base, ), - title: cn( + title: clsx( "text-small font-medium text-default-500 group-data-[selected=true]:text-foreground", itemClasses?.title, ), diff --git a/components/ui/sidebar/SidebarWrap.tsx b/components/ui/sidebar/SidebarWrap.tsx index 86f23ce076..75c43aa853 100644 --- a/components/ui/sidebar/SidebarWrap.tsx +++ b/components/ui/sidebar/SidebarWrap.tsx @@ -6,8 +6,6 @@ import clsx from "clsx"; import React, { useCallback, useEffect, useState } from "react"; import { useMediaQuery } from "usehooks-ts"; -import { cn } from "@/utils/cn"; - import { ProwlerExtended, ProwlerShort, @@ -90,7 +88,7 @@ export const SidebarWrap = () => {
@@ -101,7 +99,7 @@ export const SidebarWrap = () => { >
@@ -172,7 +170,7 @@ export const SidebarWrap = () => { placement={isCompact ? "right" : "top"} >
{ placement={isCompact ? "right" : "top"} >