lms/bootstrap/ssr/assets/sidebar-toggle-CX5WWN8f.js
2025-12-15 12:26:23 +01:00

35 lines
1.4 KiB
JavaScript

import { jsx } from "react/jsx-runtime";
import { B as Button } from "./button-CdJZJLGw.js";
import { u as useSidebar } from "./sidebar-C1tqSfnl.js";
import { c as cn } from "./utils-DLCPGU0v.js";
import { ChevronRight, ChevronLeft } from "lucide-react";
import "react";
import "@radix-ui/react-slot";
import "class-variance-authority";
import "./separator-CSqU-rrB.js";
import "@radix-ui/react-separator";
import "./sheet-BOQ-e9_C.js";
import "@radix-ui/react-dialog";
import "./tooltip-BYKuzaoQ.js";
import "@radix-ui/react-tooltip";
import "clsx";
import "tailwind-merge";
const SidebarToggle = ({ className }) => {
const { open, isMobile, openMobile, toggleSidebar } = useSidebar();
return /* @__PURE__ */ jsx(
Button,
{
variant: "outline",
onClick: () => toggleSidebar(),
className: cn(
"bg-secondary-foreground text-primary-foreground hover:bg-secondary-foreground hover:text-primary-foreground z-10 h-10 w-8 rounded-none rounded-bl border-none p-0 shadow-none",
className
),
children: isMobile ? openMobile ? /* @__PURE__ */ jsx(ChevronRight, { className: "!h-6 !w-6" }) : /* @__PURE__ */ jsx(ChevronLeft, { className: "!h-6 !w-6" }) : open ? /* @__PURE__ */ jsx(ChevronRight, { className: "!h-6 !w-6" }) : /* @__PURE__ */ jsx(ChevronLeft, { className: "!h-6 !w-6" })
}
);
};
export {
SidebarToggle as default
};