@amogads/ui 1.1.1 → 1.1.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.mjs CHANGED
@@ -11859,18 +11859,30 @@ var sidebarData2 = {
11859
11859
 
11860
11860
  // src/design-system/templates/app-logo.tsx
11861
11861
  import { jsx as jsx103 } from "react/jsx-runtime";
11862
- function AppLogo({ className }) {
11863
- const { toggleSidebar } = useSidebar();
11862
+ function AppLogo({ className, onClick }) {
11863
+ const { toggleSidebar, setOpenMobile, isMobile } = useSidebar();
11864
11864
  const team = sidebarData2.teams[0];
11865
11865
  const Logo = team.logo;
11866
+ const handleClick = (e) => {
11867
+ e.stopPropagation();
11868
+ if (onClick) {
11869
+ onClick();
11870
+ return;
11871
+ }
11872
+ if (isMobile) {
11873
+ setOpenMobile(true);
11874
+ } else {
11875
+ toggleSidebar();
11876
+ }
11877
+ };
11866
11878
  return /* @__PURE__ */ jsx103(
11867
11879
  Button,
11868
11880
  {
11869
11881
  type: "button",
11870
11882
  variant: "ghost",
11871
- onClick: toggleSidebar,
11883
+ onClick: handleClick,
11872
11884
  className: cn(
11873
- "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9",
11885
+ "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9 cursor-pointer",
11874
11886
  className
11875
11887
  ),
11876
11888
  "aria-label": "Open sidebar menu",