@dextinity/mail-react 10.2.0-canary-20260824083539 → 10.2.0-canary-20260824125757
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type HtmlImageProps } from "../../components/image/HtmlImage.js";
|
|
2
3
|
import type { PixelImageBlockBaseProps } from "./common.js";
|
|
3
|
-
export type HtmlPixelImageBlockProps = Omit<
|
|
4
|
+
export type HtmlPixelImageBlockProps = Omit<HtmlImageProps, "src" | "width" | "height"> & PixelImageBlockBaseProps;
|
|
4
5
|
/**
|
|
5
6
|
* Renders a pixel-image from the DAM as a raw `<img>` tag.
|
|
6
7
|
*
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
-
export type HtmlImageProps = ComponentProps<"img"
|
|
1
|
+
import type { ComponentProps, CSSProperties, ReactNode } from "react";
|
|
2
|
+
export type HtmlImageProps = ComponentProps<"img"> & {
|
|
3
|
+
/** Corner radius of the image. */
|
|
4
|
+
borderRadius?: CSSProperties["borderRadius"];
|
|
5
|
+
};
|
|
3
6
|
/**
|
|
4
7
|
* Renders an `<img>` tag that adapts to its container width below the default
|
|
5
8
|
* breakpoint.
|
|
@@ -9,4 +12,4 @@ export type HtmlImageProps = ComponentProps<"img">;
|
|
|
9
12
|
* Inside `MjmlRaw` in an `MjmlColumn`, place `HtmlImage` in a `<tr>` and `<td>` of its own.
|
|
10
13
|
* For MJML context, use `MjmlImage`.
|
|
11
14
|
*/
|
|
12
|
-
export declare function HtmlImage({ className, ...restProps }: HtmlImageProps): ReactNode;
|
|
15
|
+
export declare function HtmlImage({ className, borderRadius, style, ...restProps }: HtmlImageProps): ReactNode;
|
|
@@ -11,8 +11,8 @@ import { css } from "../../utils/css.js";
|
|
|
11
11
|
* Inside `MjmlRaw` in an `MjmlColumn`, place `HtmlImage` in a `<tr>` and `<td>` of its own.
|
|
12
12
|
* For MJML context, use `MjmlImage`.
|
|
13
13
|
*/
|
|
14
|
-
export function HtmlImage({ className, ...restProps }) {
|
|
15
|
-
return _jsx("img", { className: clsx("htmlImage", className), ...restProps });
|
|
14
|
+
export function HtmlImage({ className, borderRadius, style, ...restProps }) {
|
|
15
|
+
return _jsx("img", { className: clsx("htmlImage", className), style: { borderRadius, ...style }, ...restProps });
|
|
16
16
|
}
|
|
17
17
|
registerStyles((theme) => css `
|
|
18
18
|
${theme.breakpoints.default.belowMediaQuery} {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { type IMjmlImageProps } from "@faire/mjml-react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type MjmlImageProps = IMjmlImageProps
|
|
2
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
3
|
+
export type MjmlImageProps = Omit<IMjmlImageProps, "borderRadius"> & {
|
|
4
|
+
/** Corner radius of the image. */
|
|
5
|
+
borderRadius?: CSSProperties["borderRadius"];
|
|
6
|
+
};
|
|
4
7
|
/**
|
|
5
8
|
* Renders an MJML image that adapts to the viewport width below the default breakpoint.
|
|
6
9
|
*
|
|
7
10
|
* Must be placed within an `MjmlColumn`. For raw HTML context (e.g. inside `MjmlRaw`),
|
|
8
11
|
* use `HtmlImage` instead.
|
|
9
12
|
*/
|
|
10
|
-
export declare function MjmlImage({ className, ...restProps }: MjmlImageProps): ReactNode;
|
|
13
|
+
export declare function MjmlImage({ className, borderRadius, ...restProps }: MjmlImageProps): ReactNode;
|
|
@@ -9,8 +9,8 @@ import { css } from "../../utils/css.js";
|
|
|
9
9
|
* Must be placed within an `MjmlColumn`. For raw HTML context (e.g. inside `MjmlRaw`),
|
|
10
10
|
* use `HtmlImage` instead.
|
|
11
11
|
*/
|
|
12
|
-
export function MjmlImage({ className, ...restProps }) {
|
|
13
|
-
return _jsx(BaseMjmlImage, { className: clsx("mjmlImage", className), ...restProps });
|
|
12
|
+
export function MjmlImage({ className, borderRadius, ...restProps }) {
|
|
13
|
+
return _jsx(BaseMjmlImage, { className: clsx("mjmlImage", className), borderRadius: borderRadius, ...restProps });
|
|
14
14
|
}
|
|
15
15
|
// MJML inlines a fixed `height` on the inner <img>; !important overrides it for responsive scaling.
|
|
16
16
|
registerStyles((theme) => css `
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dextinity/mail-react",
|
|
3
|
-
"version": "10.2.0-canary-
|
|
3
|
+
"version": "10.2.0-canary-20260824125757",
|
|
4
4
|
"description": "Utilities for building HTML emails with React",
|
|
5
5
|
"license": "BSD-2-Clause",
|
|
6
6
|
"type": "module",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
49
|
"vite": "^7.3.1",
|
|
50
50
|
"vitest": "^4.1.8",
|
|
51
|
-
"@dextinity/
|
|
52
|
-
"@dextinity/
|
|
51
|
+
"@dextinity/cli": "10.2.0-canary-20260824125757",
|
|
52
|
+
"@dextinity/eslint-config": "10.2.0-canary-20260824125757"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|