@react-email/body 0.0.11 → 0.1.0

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.js CHANGED
@@ -57,11 +57,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
57
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
58
 
59
59
  // src/index.ts
60
- var src_exports = {};
61
- __export(src_exports, {
60
+ var index_exports = {};
61
+ __export(index_exports, {
62
62
  Body: () => Body
63
63
  });
64
- module.exports = __toCommonJS(src_exports);
64
+ module.exports = __toCommonJS(index_exports);
65
65
 
66
66
  // src/body.tsx
67
67
  var React = __toESM(require("react"));
@@ -69,7 +69,28 @@ var import_jsx_runtime = require("react/jsx-runtime");
69
69
  var Body = React.forwardRef(
70
70
  (_a, ref) => {
71
71
  var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("body", __spreadProps(__spreadValues({}, props), { ref, style, children }));
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ "body",
74
+ __spreadProps(__spreadValues({}, props), {
75
+ style: {
76
+ background: style == null ? void 0 : style.background,
77
+ backgroundColor: style == null ? void 0 : style.backgroundColor
78
+ },
79
+ ref,
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ "table",
82
+ {
83
+ border: 0,
84
+ width: "100%",
85
+ cellPadding: "0",
86
+ cellSpacing: "0",
87
+ role: "presentation",
88
+ align: "center",
89
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { style, children }) }) })
90
+ }
91
+ )
92
+ })
93
+ );
73
94
  }
74
95
  );
75
96
  Body.displayName = "Body";
package/dist/index.mjs CHANGED
@@ -36,7 +36,28 @@ import { jsx } from "react/jsx-runtime";
36
36
  var Body = React.forwardRef(
37
37
  (_a, ref) => {
38
38
  var _b = _a, { children, style } = _b, props = __objRest(_b, ["children", "style"]);
39
- return /* @__PURE__ */ jsx("body", __spreadProps(__spreadValues({}, props), { ref, style, children }));
39
+ return /* @__PURE__ */ jsx(
40
+ "body",
41
+ __spreadProps(__spreadValues({}, props), {
42
+ style: {
43
+ background: style == null ? void 0 : style.background,
44
+ backgroundColor: style == null ? void 0 : style.backgroundColor
45
+ },
46
+ ref,
47
+ children: /* @__PURE__ */ jsx(
48
+ "table",
49
+ {
50
+ border: 0,
51
+ width: "100%",
52
+ cellPadding: "0",
53
+ cellSpacing: "0",
54
+ role: "presentation",
55
+ align: "center",
56
+ children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { style, children }) }) })
57
+ }
58
+ )
59
+ })
60
+ );
40
61
  }
41
62
  );
42
63
  Body.displayName = "Body";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-email/body",
3
- "version": "0.0.11",
3
+ "version": "0.1.0",
4
4
  "description": "A React body component to wrap emails",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -26,9 +26,8 @@
26
26
  "react": "^18.0 || ^19.0 || ^19.0.0-rc"
27
27
  },
28
28
  "devDependencies": {
29
- "typescript": "5.1.6",
30
- "@react-email/render": "1.0.3",
31
- "eslint-config-custom": "0.0.0",
29
+ "typescript": "5.8.3",
30
+ "@react-email/render": "1.1.4",
32
31
  "tsconfig": "0.0.0"
33
32
  },
34
33
  "publishConfig": {
@@ -36,10 +35,9 @@
36
35
  },
37
36
  "scripts": {
38
37
  "build": "tsup src/index.ts --format esm,cjs --dts --external react",
38
+ "build:watch": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
39
39
  "clean": "rm -rf dist",
40
- "dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
41
- "lint": "eslint .",
42
- "test:watch": "vitest",
43
- "test": "vitest run"
40
+ "test": "vitest run",
41
+ "test:watch": "vitest"
44
42
  }
45
43
  }