@umami/react-zen 0.156.0 → 0.157.0
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 +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31476,6 +31476,11 @@ function NavMenuGroup({
|
|
|
31476
31476
|
...props
|
|
31477
31477
|
}) {
|
|
31478
31478
|
const [minimized, setMinimized] = (0, import_react185.useState)(!!isMinimized);
|
|
31479
|
+
const handleClick = () => {
|
|
31480
|
+
if (allowMinimize) {
|
|
31481
|
+
setMinimized((state) => !state);
|
|
31482
|
+
}
|
|
31483
|
+
};
|
|
31479
31484
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
31480
31485
|
Column,
|
|
31481
31486
|
{
|
|
@@ -31489,7 +31494,7 @@ function NavMenuGroup({
|
|
|
31489
31494
|
className: NavMenu_default.item,
|
|
31490
31495
|
alignItems: "center",
|
|
31491
31496
|
justifyContent: "space-between",
|
|
31492
|
-
onClick:
|
|
31497
|
+
onClick: handleClick,
|
|
31493
31498
|
children: [
|
|
31494
31499
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { className: NavMenu_default.title, children: title }),
|
|
31495
31500
|
allowMinimize && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronRight, {}) })
|
package/dist/index.mjs
CHANGED
|
@@ -31364,6 +31364,11 @@ function NavMenuGroup({
|
|
|
31364
31364
|
...props
|
|
31365
31365
|
}) {
|
|
31366
31366
|
const [minimized, setMinimized] = useState15(!!isMinimized);
|
|
31367
|
+
const handleClick = () => {
|
|
31368
|
+
if (allowMinimize) {
|
|
31369
|
+
setMinimized((state) => !state);
|
|
31370
|
+
}
|
|
31371
|
+
};
|
|
31367
31372
|
return /* @__PURE__ */ jsxs29(
|
|
31368
31373
|
Column,
|
|
31369
31374
|
{
|
|
@@ -31377,7 +31382,7 @@ function NavMenuGroup({
|
|
|
31377
31382
|
className: NavMenu_default.item,
|
|
31378
31383
|
alignItems: "center",
|
|
31379
31384
|
justifyContent: "space-between",
|
|
31380
|
-
onClick:
|
|
31385
|
+
onClick: handleClick,
|
|
31381
31386
|
children: [
|
|
31382
31387
|
/* @__PURE__ */ jsx53(Text, { className: NavMenu_default.title, children: title }),
|
|
31383
31388
|
allowMinimize && /* @__PURE__ */ jsx53(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ jsx53(ChevronRight, {}) })
|