@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.js CHANGED
@@ -12140,18 +12140,30 @@ var sidebarData2 = {
12140
12140
 
12141
12141
  // src/design-system/templates/app-logo.tsx
12142
12142
  var import_jsx_runtime103 = require("react/jsx-runtime");
12143
- function AppLogo({ className }) {
12144
- const { toggleSidebar } = useSidebar();
12143
+ function AppLogo({ className, onClick }) {
12144
+ const { toggleSidebar, setOpenMobile, isMobile } = useSidebar();
12145
12145
  const team = sidebarData2.teams[0];
12146
12146
  const Logo = team.logo;
12147
+ const handleClick = (e) => {
12148
+ e.stopPropagation();
12149
+ if (onClick) {
12150
+ onClick();
12151
+ return;
12152
+ }
12153
+ if (isMobile) {
12154
+ setOpenMobile(true);
12155
+ } else {
12156
+ toggleSidebar();
12157
+ }
12158
+ };
12147
12159
  return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
12148
12160
  Button,
12149
12161
  {
12150
12162
  type: "button",
12151
12163
  variant: "ghost",
12152
- onClick: toggleSidebar,
12164
+ onClick: handleClick,
12153
12165
  className: cn(
12154
- "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9",
12166
+ "size-8 shrink-0 p-0 hover:bg-transparent sm:size-9 cursor-pointer",
12155
12167
  className
12156
12168
  ),
12157
12169
  "aria-label": "Open sidebar menu",