@hilum/ui 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/sidebar.tsx +6 -1
package/package.json
CHANGED
|
@@ -59,6 +59,10 @@ function useSidebar() {
|
|
|
59
59
|
return ctx;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
function useOptionalSidebar() {
|
|
63
|
+
return React.useContext(SidebarContext);
|
|
64
|
+
}
|
|
65
|
+
|
|
62
66
|
/* ------------------------------------------------------------------ */
|
|
63
67
|
/* SidebarProvider */
|
|
64
68
|
/* ------------------------------------------------------------------ */
|
|
@@ -496,7 +500,7 @@ function SidebarMenuButton({
|
|
|
496
500
|
data-size={size}
|
|
497
501
|
className={cn(
|
|
498
502
|
// Base
|
|
499
|
-
"peer/menu-button flex min-h-
|
|
503
|
+
"peer/menu-button flex min-h-8 w-full items-center gap-2 overflow-hidden rounded-md px-2 py-1.5 body-sm text-left",
|
|
500
504
|
"outline-none ring-ring",
|
|
501
505
|
"transition-[width,height,padding] duration-150",
|
|
502
506
|
"hover:bg-muted hover:text-foreground",
|
|
@@ -723,5 +727,6 @@ export {
|
|
|
723
727
|
SIDEBAR_WIDTH,
|
|
724
728
|
SIDEBAR_WIDTH_ICON,
|
|
725
729
|
SIDEBAR_WIDTH_MOBILE,
|
|
730
|
+
useOptionalSidebar,
|
|
726
731
|
useSidebar,
|
|
727
732
|
};
|