react-better-html 1.1.273 → 1.1.274

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
@@ -8074,7 +8074,31 @@ var MenuItemTypeItem = memo27(function MenuItemTypeItem2({
8074
8074
  });
8075
8075
  var MenuItemTypeDivider = memo27(function MenuItemTypeDivider2({ item }) {
8076
8076
  const theme2 = useTheme29();
8077
- return /* @__PURE__ */ jsx27(Div_default.row, { paddingTop: theme2.styles.space, paddingInline: theme2.styles.gap, children: /* @__PURE__ */ jsx27(Text_default, { fontSize: 12, fontWeight: 700, textTransform: "uppercase", color: theme2.colors.textSecondary, children: item.text }) });
8077
+ const { sideMenuIsCollapsed } = useBetterHtmlContextInternal();
8078
+ const isCollapsed = sideMenuIsCollapsed && !item.shortText;
8079
+ return /* @__PURE__ */ jsx27(
8080
+ Div_default.row,
8081
+ {
8082
+ maxHeight: !isCollapsed ? 30 : 0,
8083
+ paddingTop: !isCollapsed ? theme2.styles.space : theme2.styles.gap / 2,
8084
+ paddingInline: theme2.styles.gap,
8085
+ overflow: "hidden",
8086
+ transition: `max-height ${theme2.styles.transition}, padding-top ${theme2.styles.transition}`,
8087
+ children: /* @__PURE__ */ jsx27(
8088
+ Text_default,
8089
+ {
8090
+ width: "100%",
8091
+ fontSize: 12,
8092
+ fontWeight: 700,
8093
+ textTransform: "uppercase",
8094
+ textAlign: sideMenuIsCollapsed ? "center" : void 0,
8095
+ color: theme2.colors.textSecondary,
8096
+ whiteSpace: "nowrap",
8097
+ children: sideMenuIsCollapsed ? item.shortText : item.text
8098
+ }
8099
+ )
8100
+ }
8101
+ );
8078
8102
  });
8079
8103
  var MenuItemComponent = memo27(function MenuItemComponent2({ item, ...props }) {
8080
8104
  return /* @__PURE__ */ jsx27(Div_default, { width: "100%", children: item.type === "item" ? /* @__PURE__ */ jsx27(MenuItemTypeItem, { item, ...props }) : item.type === "divider" ? /* @__PURE__ */ jsx27(MenuItemTypeDivider, { item }) : void 0 });