diy-template-components 0.2.18 → 0.2.19

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/build/index.js CHANGED
@@ -7935,8 +7935,7 @@ const useEmailStyles = createUseStyles(theme => ({
7935
7935
  wrapper: {
7936
7936
  fontFamily: theme?.typography?.fontFamily,
7937
7937
  width: '100%',
7938
- tableLayout: 'fixed',
7939
- backgroundColor: '#cccccc'
7938
+ tableLayout: 'fixed'
7940
7939
  },
7941
7940
  email_description_para: {
7942
7941
  '& p': {
@@ -8007,7 +8006,8 @@ const useEmailStyles = createUseStyles(theme => ({
8007
8006
  function Section({
8008
8007
  nodeData,
8009
8008
  emailRef,
8010
- customHtmlData
8009
+ customHtmlData,
8010
+ renderHTML = false
8011
8011
  }) {
8012
8012
  const header = nodeData?.components[0];
8013
8013
  const body = nodeData?.components[1];
@@ -8229,7 +8229,8 @@ function Section({
8229
8229
  href: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.text : undefined,
8230
8230
  target: "_blank",
8231
8231
  style: {
8232
- textDecoration: 'none'
8232
+ textDecoration: 'none',
8233
+ display: renderHTML && footer?.components[0]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8233
8234
  }
8234
8235
  }, /*#__PURE__*/React__default["default"].createElement("img", {
8235
8236
  src: footer?.components[0]?.metadata?.text ? footer?.components[0]?.metadata?.iconUrlColor : footer?.components[0]?.metadata?.iconUrl,
@@ -8244,7 +8245,8 @@ function Section({
8244
8245
  href: footer?.components[1]?.metadata?.text ? footer?.components[1]?.metadata?.text : undefined,
8245
8246
  target: "_blank",
8246
8247
  style: {
8247
- textDecoration: 'none'
8248
+ textDecoration: 'none',
8249
+ display: renderHTML && footer?.components[1]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8248
8250
  }
8249
8251
  }, /*#__PURE__*/React__default["default"].createElement("img", {
8250
8252
  src: footer?.components[1]?.metadata?.text ? footer?.components[1]?.metadata?.iconUrlColor : footer?.components[1]?.metadata?.iconUrl,
@@ -8260,7 +8262,8 @@ function Section({
8260
8262
  href: footer?.components[2]?.metadata?.text ? footer?.components[2]?.metadata?.text : undefined,
8261
8263
  target: "_blank",
8262
8264
  style: {
8263
- textDecoration: 'none'
8265
+ textDecoration: 'none',
8266
+ display: renderHTML && footer?.components[2]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8264
8267
  }
8265
8268
  }, /*#__PURE__*/React__default["default"].createElement("img", {
8266
8269
  src: footer?.components[2]?.metadata?.text ? footer?.components[2]?.metadata?.iconUrlColor : footer?.components[2]?.metadata?.iconUrl,
@@ -8275,7 +8278,8 @@ function Section({
8275
8278
  href: footer?.components[3]?.metadata?.text ? footer?.components[3]?.metadata?.text : undefined,
8276
8279
  target: "_blank",
8277
8280
  style: {
8278
- textDecoration: 'none'
8281
+ textDecoration: 'none',
8282
+ display: renderHTML && footer?.components[3]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8279
8283
  }
8280
8284
  }, /*#__PURE__*/React__default["default"].createElement("img", {
8281
8285
  src: footer?.components[3]?.metadata?.text ? footer?.components[3]?.metadata?.iconUrlColor : footer?.components[3]?.metadata?.iconUrl,
@@ -8291,7 +8295,8 @@ function Section({
8291
8295
  href: footer?.components[4]?.metadata?.text ? footer?.components[4]?.metadata?.text : undefined,
8292
8296
  target: "_blank",
8293
8297
  style: {
8294
- textDecoration: 'none'
8298
+ textDecoration: 'none',
8299
+ display: renderHTML && footer?.components[4]?.metadata?.text ? '' : renderHTML === false ? '' : 'none'
8295
8300
  }
8296
8301
  }, /*#__PURE__*/React__default["default"].createElement("img", {
8297
8302
  src: footer?.components[4]?.metadata?.text ? footer?.components[4]?.metadata?.iconUrlColor : footer?.components[4]?.metadata?.iconUrl,
@@ -8348,7 +8353,8 @@ function EmailDripMarket({
8348
8353
  const isInitialMount = React.useRef(true);
8349
8354
  const convertToHtml = sectionData => {
8350
8355
  const html = ReactDOMServer__default["default"].renderToStaticMarkup( /*#__PURE__*/React__default["default"].createElement(Section, {
8351
- nodeData: sectionData
8356
+ nodeData: sectionData,
8357
+ renderHTML: true
8352
8358
  }));
8353
8359
  return html;
8354
8360
  };
@@ -8364,8 +8370,7 @@ function EmailDripMarket({
8364
8370
  const emailRef = React.useRef(null);
8365
8371
  return /*#__PURE__*/React__default["default"].createElement("section", {
8366
8372
  style: {
8367
- width: '95%',
8368
- paddingBottom: '30%'
8373
+ width: '95%'
8369
8374
  }
8370
8375
  }, /*#__PURE__*/React__default["default"].createElement("div", {
8371
8376
  onClick: e => {