@pagenflow/email 1.3.4 → 1.3.5

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.esm.js CHANGED
@@ -2148,8 +2148,10 @@ function Head({ children, backgroundColor = "#ffffff", title = "Email Preview",
2148
2148
  }
2149
2149
 
2150
2150
  function Heading({ config, devMode, children }) {
2151
- var _a;
2152
2151
  const { text, level = "h1", padding, color, textAlign, fontSize, fontWeight, fontStyle, lineHeight, letterSpacing, textTransform, textDecoration, direction, verticalAlign, backgroundColor, } = config;
2152
+ // Determine the content to render
2153
+ const content = text !== null && text !== void 0 ? text : children;
2154
+ const isString = typeof content === "string";
2153
2155
  // 1. TD Style: Where padding, background, width, and verticalAlign are applied.
2154
2156
  const tdStyle = {
2155
2157
  padding: padding,
@@ -2176,7 +2178,6 @@ function Heading({ config, devMode, children }) {
2176
2178
  fontFamily: "Arial, Helvetica, sans-serif",
2177
2179
  // Outlook specific fixes (using string indexing)
2178
2180
  ["msoLineHeightRule"]: "exactly",
2179
- // ["mso-line-height-rule" as string]: "exactly",
2180
2181
  };
2181
2182
  // Dynamically create the Heading element
2182
2183
  const HeadingTag = level;
@@ -2185,7 +2186,7 @@ function Heading({ config, devMode, children }) {
2185
2186
  jsx("table", { "aria-label": "Heading Block Wrapper", role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
2186
2187
  width: "100%",
2187
2188
  borderCollapse: "collapse",
2188
- }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { style: tdStyle, align: textAlign, children: jsx(HeadingTag, { style: headingStyle, dangerouslySetInnerHTML: { __html: (_a = text !== null && text !== void 0 ? text : children) !== null && _a !== void 0 ? _a : "" } }) }) }) }) }));
2189
+ }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { style: tdStyle, align: textAlign, children: isString ? (jsx(HeadingTag, { style: headingStyle, dangerouslySetInnerHTML: { __html: content } })) : (jsx(HeadingTag, { style: headingStyle, children: content })) }) }) }) }));
2189
2190
  }
2190
2191
  var Heading_default = memo(Heading, arePropsEqual);
2191
2192