@pagenflow/email 1.1.6 → 1.1.8

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
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import React, { memo, createElement, Fragment, useEffect } from 'react';
2
+ import React, { memo, Fragment, useEffect } from 'react';
3
3
 
4
4
  function Body({ children, config = {} }) {
5
5
  var _a, _b, _c, _d;
@@ -17332,7 +17332,6 @@ function Button({ config, devMode }) {
17332
17332
  color = "#ffffff", padding = "12px 24px", borderRadius = "3px", width, justifyContent = "center", } = config;
17333
17333
  // 1. Link (A) Tag Styles (Fallback for Webmail/Mobile)
17334
17334
  const linkStyle = {
17335
- color: color,
17336
17335
  textDecoration: "none",
17337
17336
  display: "block",
17338
17337
  // Apply padding here for simplicity, though the TD is more reliable
@@ -17365,7 +17364,7 @@ function Button({ config, devMode }) {
17365
17364
  <!--[if mso]>
17366
17365
  <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="${href}" style="height:${vmlHeight}px;v-text-anchor:middle;width:${vmlWidth}px;" arcsize="${(parseInt(borderRadius) / vmlHeight) * 100}%" strokecolor="${vmlFillColor}" fillcolor="${vmlFillColor}">
17367
17366
  <w:anchorlock/>
17368
- <center style="color:${color};font-family:Arial,sans-serif;font-size:16px;font-weight:bold;">
17367
+ <center style="color:${color};font-family:${linkStyle.fontFamily};font-size:${linkStyle.fontSize};font-weight:${linkStyle.fontWeight};">
17369
17368
  ${typeof children === "string" ? children : ""}
17370
17369
  </center>
17371
17370
  </v:roundrect>
@@ -17384,16 +17383,24 @@ function Button({ config, devMode }) {
17384
17383
  border: "0 solid",
17385
17384
  margin: 0,
17386
17385
  padding: 0,
17387
- }, children: jsx("tbody", { children: jsx("tr", { children: jsxs("td", { children: [jsx("div", { dangerouslySetInnerHTML: { __html: vmlButton } }), jsx("div", { dangerouslySetInnerHTML: { __html: `<!--[if !mso]><!-->` } }), jsx("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: {
17388
- borderCollapse: "collapse",
17389
- width: "100%",
17390
- }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { style: buttonTdStyle, children: createElement(devMode ? "button" : "a", Object.assign(Object.assign({}, (devMode
17391
- ? {}
17392
- : {
17393
- href,
17394
- target: "_blank",
17395
- rel: "noopener noreferrer",
17396
- })), { style: linkStyle, draggable: false }), children) }) }) }) }), jsx("div", { dangerouslySetInnerHTML: { __html: `<!--<![endif]-->` } })] }) }) }) }));
17386
+ }, children: jsx("tbody", { children: jsx("tr", { children: jsx("td", { dangerouslySetInnerHTML: {
17387
+ __html: `
17388
+ ${vmlButton}
17389
+ <!--[if !mso]><!-->
17390
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="border-collapse: collapse; width: 100%;">
17391
+ <tbody>
17392
+ <tr>
17393
+ <td style="background-color: ${buttonTdStyle.backgroundColor}; border-radius: ${buttonTdStyle.borderRadius}; padding: ${buttonTdStyle.padding}; width: ${buttonTdStyle.width};">
17394
+ <a href="${href}" target="_blank" rel="noopener noreferrer" style="color: ${color}; text-decoration: ${linkStyle.textDecoration}; display: ${linkStyle.display}; padding: ${linkStyle.padding}; word-break: ${linkStyle.wordBreak}; font-family: ${linkStyle.fontFamily}; font-size: ${linkStyle.fontSize}; font-weight: ${linkStyle.fontWeight}; line-height: ${linkStyle.lineHeight};">
17395
+ ${typeof children === "string" ? children : ""}
17396
+ </a>
17397
+ </td>
17398
+ </tr>
17399
+ </tbody>
17400
+ </table>
17401
+ <!--<![endif]-->
17402
+ `,
17403
+ } }) }) }) }));
17397
17404
  }
17398
17405
  var Button_default = memo(Button, arePropsEqual);
17399
17406