@pagenflow/email 1.3.1 → 1.3.2
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/components/Row.d.ts +7 -0
- package/dist/index.cjs.js +6 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/components/Row.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { AlignItems, BorderConfig, JustifyContent } from "../types";
|
|
3
|
+
export interface BackgroundImageType {
|
|
4
|
+
src: string;
|
|
5
|
+
repeat?: "no-repeat" | "repeat" | "repeat-x" | "repeat-y";
|
|
6
|
+
size?: "auto" | "cover" | "contain";
|
|
7
|
+
position?: string;
|
|
8
|
+
}
|
|
3
9
|
export interface RowConfig {
|
|
4
10
|
gap?: string;
|
|
5
11
|
justifyContent?: JustifyContent;
|
|
@@ -8,6 +14,7 @@ export interface RowConfig {
|
|
|
8
14
|
height?: string;
|
|
9
15
|
padding?: string;
|
|
10
16
|
backgroundColor?: string;
|
|
17
|
+
backgroundImage?: BackgroundImageType;
|
|
11
18
|
borderRadius?: string;
|
|
12
19
|
border?: BorderConfig;
|
|
13
20
|
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -2184,10 +2184,15 @@ function getBorderStyle$1(border) {
|
|
|
2184
2184
|
return style;
|
|
2185
2185
|
}
|
|
2186
2186
|
function Row({ children, config, devNode }) {
|
|
2187
|
+
var _a, _b, _c;
|
|
2187
2188
|
const childrenArray = (Array.isArray(children) ? children : [children]).filter((child) => child != null);
|
|
2188
2189
|
const numChildren = childrenArray.length;
|
|
2189
2190
|
// 1. Outer TD for Background and Border Radius (no border here)
|
|
2190
|
-
const backgroundTdStyle = Object.assign({ backgroundColor: config.backgroundColor, borderRadius: config.borderRadius, width: config.width || "100%", height: config.height
|
|
2191
|
+
const backgroundTdStyle = Object.assign({ backgroundColor: config.backgroundColor, borderRadius: config.borderRadius, width: config.width || "100%", height: config.height,
|
|
2192
|
+
// Background Image styles
|
|
2193
|
+
backgroundImage: config.backgroundImage
|
|
2194
|
+
? `url(${config.backgroundImage.src})`
|
|
2195
|
+
: undefined, backgroundRepeat: (_a = config.backgroundImage) === null || _a === void 0 ? void 0 : _a.repeat, backgroundSize: (_b = config.backgroundImage) === null || _b === void 0 ? void 0 : _b.size, backgroundPosition: (_c = config.backgroundImage) === null || _c === void 0 ? void 0 : _c.position }, (config.borderRadius && { overflow: "hidden" }));
|
|
2191
2196
|
// 2. Inner Table for Border and Border Radius
|
|
2192
2197
|
const borderTableStyle = Object.assign({ width: "100%", height: "100%", borderCollapse: "separate", borderSpacing: 0, borderRadius: config.borderRadius }, getBorderStyle$1(config.border));
|
|
2193
2198
|
// 3. TD for Padding
|