🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@react-email/section

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-email/section - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+8
-1
dist/index.js

@@ -47,2 +47,9 @@ "use strict";

};
const arrayChildren = React.Children.toArray(children);
const hasTdElement = (child) => {
return React.isValidElement(child) && child.type === "td";
};
const finalChildren = arrayChildren.map((child, index) => {
return hasTdElement(child) ? child : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: child }, index);
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -59,3 +66,3 @@ "table",

...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { style: styleDefaultTr, children }) })
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { style: styleDefaultTr, children: finalChildren }) })
}

@@ -62,0 +69,0 @@ );

@@ -15,2 +15,9 @@ // src/section.tsx

};
const arrayChildren = React.Children.toArray(children);
const hasTdElement = (child) => {
return React.isValidElement(child) && child.type === "td";
};
const finalChildren = arrayChildren.map((child, index) => {
return hasTdElement(child) ? child : /* @__PURE__ */ jsx("td", { children: child }, index);
});
return /* @__PURE__ */ jsx(

@@ -27,3 +34,3 @@ "table",

...props,
children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { style: styleDefaultTr, children }) })
children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { style: styleDefaultTr, children: finalChildren }) })
}

@@ -30,0 +37,0 @@ );

+1
-1
{
"name": "@react-email/section",
"version": "0.0.3",
"version": "0.0.4",
"description": "Display a section that can be formatted using columns",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -36,6 +36,9 @@ ![React Email Section cover](https://react.email/static/covers/section.png)

import { Section } from '@react-email/section';
import { Text } from '@react-email/text';
const Section = () => {
return (
<Section>{/* Any column. */}<Section />
<Section>
<Text>Hello World</Text>
<Section />
);

@@ -42,0 +45,0 @@ };