Refactor New Ui Bumdes 02

This commit is contained in:
2026-03-25 10:32:31 +08:00
parent 84b96ca3be
commit 71a305cd4b
14 changed files with 302 additions and 89 deletions

View File

@@ -0,0 +1,25 @@
import { useDisclosure } from "@mantine/hooks";
export function useSidebarFullscreen() {
const [opened, { toggle: toggleMobile }] = useDisclosure();
const [sidebarCollapsed, setSidebarCollapsed] = useDisclosure(false);
const toggleSidebar = () => {
setSidebarCollapsed.toggle();
};
const handleMainClick = () => {
if (!sidebarCollapsed) {
toggleSidebar();
}
};
return {
opened,
toggleMobile,
sidebarCollapsed,
toggleSidebar,
handleMainClick,
isCollapsed: sidebarCollapsed,
};
}