@dextinity/agent-features 2.0.0-canary-20260729062014
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/LICENSE +24 -0
- package/package.json +19 -0
- package/rules/coding-guidelines/api-nestjs.instructions.md +107 -0
- package/rules/coding-guidelines/cdn.instructions.md +24 -0
- package/rules/coding-guidelines/general.instructions.md +30 -0
- package/rules/coding-guidelines/git.instructions.md +37 -0
- package/rules/coding-guidelines/kubernetes.instructions.md +59 -0
- package/rules/coding-guidelines/libraries.instructions.md +34 -0
- package/rules/coding-guidelines/naming.instructions.md +39 -0
- package/rules/coding-guidelines/postgresql.instructions.md +40 -0
- package/rules/coding-guidelines/react.instructions.md +102 -0
- package/rules/coding-guidelines/security.instructions.md +44 -0
- package/rules/coding-guidelines/styling.instructions.md +50 -0
- package/rules/coding-guidelines/typescript.instructions.md +50 -0
- package/skills/.gitkeep +0 -0
- package/skills/comet-admin-ui/SKILL.md +492 -0
- package/skills/comet-block/SKILL.md +252 -0
- package/skills/comet-block/references/admin-patterns.md +192 -0
- package/skills/comet-block/references/api-patterns.md +183 -0
- package/skills/comet-block/references/block-loader.md +368 -0
- package/skills/comet-block/references/block-types.md +210 -0
- package/skills/comet-block/references/custom-block-field.md +266 -0
- package/skills/comet-block/references/fixtures.md +436 -0
- package/skills/comet-block/references/image.md +341 -0
- package/skills/comet-block/references/migration.md +597 -0
- package/skills/comet-block/references/registration.md +167 -0
- package/skills/comet-block/references/response-summary.md +102 -0
- package/skills/comet-block/references/rich-text.md +309 -0
- package/skills/comet-block/references/select.md +176 -0
- package/skills/comet-block/references/site-patterns.md +202 -0
- package/skills/comet-core-admin-component-authoring/SKILL.md +92 -0
- package/skills/comet-mail-react/SKILL.md +621 -0
- package/skills/comet-mail-react/references/components-and-theme.md +431 -0
- package/skills/comet-mail-react/references/layout-patterns.md +315 -0
- package/skills/comet-mail-react/references/styling-and-customization.md +306 -0
- package/skills/comet-major-migration/SKILL.md +161 -0
- package/skills/comet-major-migration/references/migration-smoke-test.md +196 -0
- package/skills/comet-minor-update/SKILL.md +191 -0
- package/skills/dev-pm/SKILL.md +100 -0
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# Components & Theme Reference
|
|
2
|
+
|
|
3
|
+
Theme system, module augmentation, scoped theming, and the component behavior for `@dextinity/mail-react` that its types and TSDoc don't capture on their own. For prop names, types, and defaults, read the types and their TSDoc.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Theme tokens](#theme-tokens)
|
|
8
|
+
2. [Module Augmentation Interfaces](#module-augmentation-interfaces)
|
|
9
|
+
3. [MjmlMailRoot](#mjmlmailroot)
|
|
10
|
+
4. [MjmlSection](#mjmlsection)
|
|
11
|
+
5. [MjmlWrapper](#mjmlwrapper)
|
|
12
|
+
6. [Text Components](#text-components)
|
|
13
|
+
7. [HtmlInlineLink](#htmlinlinelink)
|
|
14
|
+
8. [Image](#image)
|
|
15
|
+
9. [Divider](#divider)
|
|
16
|
+
10. [Button](#button)
|
|
17
|
+
11. [Scoped Theming](#scoped-theming)
|
|
18
|
+
12. [MJML Component Re-exports](#mjml-component-re-exports)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Theme tokens
|
|
23
|
+
|
|
24
|
+
`createTheme(overrides?)` merges partial overrides into the default theme; every token is optional and the `Theme` type lists them. Defaults live in `createTheme`. One behavior isn't visible from the types: **the default breakpoint derives from `sizes.bodyWidth`** unless `breakpoints.default` is overridden — they describe the same boundary, so setting them apart silently desyncs the layout.
|
|
25
|
+
|
|
26
|
+
### Breakpoints
|
|
27
|
+
|
|
28
|
+
Breakpoint values are created with `createBreakpoint(pixelWidth)`:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
createBreakpoint(420);
|
|
32
|
+
// → { value: 420, belowMediaQuery: "@media (max-width: 419px)" }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The `belowMediaQuery` string is ready to use in `registerStyles` calls.
|
|
36
|
+
|
|
37
|
+
### Responsive Values
|
|
38
|
+
|
|
39
|
+
Many theme properties accept responsive values — objects keyed by breakpoint name:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
const theme = createTheme({
|
|
43
|
+
sizes: {
|
|
44
|
+
contentIndentation: { default: 40, tablet: 30, mobile: 20 },
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The `default` key provides the base value (rendered inline). Other keys generate media query overrides automatically.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Module Augmentation Interfaces
|
|
54
|
+
|
|
55
|
+
These interfaces are empty by default, designed for consumers to extend via `declare module`. Place augmentations in your theme file alongside `createTheme()`, generally below the `createTheme` call.
|
|
56
|
+
|
|
57
|
+
### TextVariants
|
|
58
|
+
|
|
59
|
+
Controls the `variant` prop on `MjmlText` and `HtmlText`:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
const theme = createTheme({
|
|
63
|
+
text: {
|
|
64
|
+
defaultVariant: "body",
|
|
65
|
+
variants: {
|
|
66
|
+
heading: { fontSize: "32px", fontWeight: 700, lineHeight: "40px" },
|
|
67
|
+
body: { fontSize: "16px", lineHeight: "24px" },
|
|
68
|
+
caption: { fontSize: "12px", lineHeight: "16px", color: "#666666" },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
declare module "@dextinity/mail-react" {
|
|
74
|
+
interface TextVariants {
|
|
75
|
+
heading: true;
|
|
76
|
+
body: true;
|
|
77
|
+
caption: true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Variant properties accept responsive values:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
heading: {
|
|
86
|
+
fontSize: { default: "32px", mobile: "24px" },
|
|
87
|
+
lineHeight: { default: "40px", mobile: "30px" },
|
|
88
|
+
bottomSpacing: { default: "24px", mobile: "16px" },
|
|
89
|
+
fontWeight: 700,
|
|
90
|
+
},
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### DividerVariants
|
|
94
|
+
|
|
95
|
+
Controls the `variant` prop on `MjmlDivider` and `HtmlDivider`:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
const theme = createTheme({
|
|
99
|
+
divider: {
|
|
100
|
+
defaultVariant: "thin",
|
|
101
|
+
variants: {
|
|
102
|
+
thin: { height: 1, backgroundColor: "#999999" },
|
|
103
|
+
thick: { height: { default: 12, mobile: 8 }, backgroundColor: "#222222" },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
declare module "@dextinity/mail-react" {
|
|
109
|
+
interface DividerVariants {
|
|
110
|
+
thin: true;
|
|
111
|
+
thick: true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Variant properties (`height`, `backgroundColor`, `backgroundImage`) accept responsive values.
|
|
117
|
+
|
|
118
|
+
### ButtonVariants
|
|
119
|
+
|
|
120
|
+
Controls the `variant` prop on `MjmlButton` and `HtmlButton`:
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
const theme = createTheme({
|
|
124
|
+
button: {
|
|
125
|
+
defaultVariant: "primary",
|
|
126
|
+
variants: {
|
|
127
|
+
primary: { backgroundColor: "#5B4FC7", color: "#FFFFFF" },
|
|
128
|
+
gradient: {
|
|
129
|
+
backgroundColor: "#5B4FC7",
|
|
130
|
+
backgroundImage: "linear-gradient(90deg, #5B4FC7, #9C5BC7)",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
declare module "@dextinity/mail-react" {
|
|
137
|
+
interface ButtonVariants {
|
|
138
|
+
primary: true;
|
|
139
|
+
gradient: true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Variant properties (`color`, `backgroundColor`, `backgroundImage`, `border`, `borderRadius`, `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `padding`) accept responsive values.
|
|
145
|
+
|
|
146
|
+
### ThemeBreakpoints
|
|
147
|
+
|
|
148
|
+
Built-in keys are `default` and `mobile`. Add custom breakpoints:
|
|
149
|
+
|
|
150
|
+
```ts
|
|
151
|
+
import { createBreakpoint, type ThemeBreakpoint } from "@dextinity/mail-react";
|
|
152
|
+
|
|
153
|
+
const theme = createTheme({
|
|
154
|
+
breakpoints: { tablet: createBreakpoint(540) },
|
|
155
|
+
sizes: {
|
|
156
|
+
contentIndentation: { default: 40, tablet: 30, mobile: 20 },
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
declare module "@dextinity/mail-react" {
|
|
161
|
+
interface ThemeBreakpoints {
|
|
162
|
+
tablet: ThemeBreakpoint;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
New breakpoint keys automatically become available in all responsive theme values.
|
|
168
|
+
|
|
169
|
+
### ThemeBackgroundColors and ThemeColors
|
|
170
|
+
|
|
171
|
+
Add project-specific color tokens:
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
const theme = createTheme({
|
|
175
|
+
colors: {
|
|
176
|
+
background: { highlight: "#FFF3CD", footer: "#1A1A2E" },
|
|
177
|
+
brand: { primary: "#0066CC", secondary: "#004499" },
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
declare module "@dextinity/mail-react" {
|
|
182
|
+
interface ThemeBackgroundColors {
|
|
183
|
+
highlight: string;
|
|
184
|
+
footer: string;
|
|
185
|
+
}
|
|
186
|
+
interface ThemeColors {
|
|
187
|
+
brand: { primary: string; secondary: string };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## MjmlMailRoot
|
|
195
|
+
|
|
196
|
+
Root element for every email template. Renders the full MJML skeleton (`<mjml>`, `<mj-head>`, `<mj-body>`) and provides the theme to all descendant components.
|
|
197
|
+
|
|
198
|
+
**What it configures from the theme:**
|
|
199
|
+
|
|
200
|
+
- Body width from `theme.sizes.bodyWidth`
|
|
201
|
+
- Body background from `theme.colors.background.body`
|
|
202
|
+
- MJML breakpoint from `theme.breakpoints.mobile` (controls when columns stack)
|
|
203
|
+
- Base font family from `theme.text.fontFamily`
|
|
204
|
+
- Zero default padding on all components
|
|
205
|
+
- Renders all registered styles (`registerStyles`) in the `<head>`
|
|
206
|
+
|
|
207
|
+
**In Storybook:** the decorator wraps stories automatically — pass a custom theme via `parameters.theme`. **Outside Storybook:** wrap content in `MjmlMailRoot` yourself.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## MjmlSection
|
|
212
|
+
|
|
213
|
+
Full-width horizontal row with theme integration.
|
|
214
|
+
|
|
215
|
+
**CSS classes:** `.mjmlSection`, `.mjmlSection--indented` (when `indent` is set).
|
|
216
|
+
|
|
217
|
+
```tsx
|
|
218
|
+
<MjmlSection indent>
|
|
219
|
+
<MjmlColumn><MjmlText>Indented content</MjmlText></MjmlColumn>
|
|
220
|
+
</MjmlSection>
|
|
221
|
+
|
|
222
|
+
<MjmlSection disableResponsiveBehavior slotProps={{ group: { width: "100%" } }}>
|
|
223
|
+
<MjmlColumn><MjmlText>Won't stack</MjmlText></MjmlColumn>
|
|
224
|
+
<MjmlColumn><MjmlText>on mobile</MjmlText></MjmlColumn>
|
|
225
|
+
</MjmlSection>
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Indentation values come from `theme.sizes.contentIndentation`, which supports responsive values.
|
|
229
|
+
|
|
230
|
+
**Inside `MjmlWrapper`:** the theme-default `backgroundColor` is suppressed so the wrapper's background shows through. An explicit `backgroundColor` prop still wins.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## MjmlWrapper
|
|
235
|
+
|
|
236
|
+
Groups multiple `MjmlSection`s that share a background. Must be a direct child of `MjmlBody`; sections go inside.
|
|
237
|
+
|
|
238
|
+
The wrapper takes the theme's content background by default. Inner `MjmlSection`s suppress their own theme-default background so the wrapper's color shows through; an explicit `backgroundColor` on an inner section still wins.
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
<MjmlWrapper backgroundColor="#dddddd">
|
|
242
|
+
<MjmlSection indent>
|
|
243
|
+
<MjmlColumn>
|
|
244
|
+
<MjmlText>First row</MjmlText>
|
|
245
|
+
</MjmlColumn>
|
|
246
|
+
</MjmlSection>
|
|
247
|
+
<MjmlSection indent>
|
|
248
|
+
<MjmlColumn>
|
|
249
|
+
<MjmlText>Second row</MjmlText>
|
|
250
|
+
</MjmlColumn>
|
|
251
|
+
</MjmlSection>
|
|
252
|
+
</MjmlWrapper>
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Typical uses: multi-section footers with their own color, or grouping sections behind a shared outer padding (e.g., the `direction="rtl"` workaround in [`layout-patterns.md`](layout-patterns.md)). For a region that also needs different default text color or variants, combine `MjmlWrapper` with a scoped `ThemeProvider` — see Scoped Theming below.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Text Components
|
|
260
|
+
|
|
261
|
+
### MjmlText
|
|
262
|
+
|
|
263
|
+
MJML text component — use inside `MjmlColumn` following the standard layout model.
|
|
264
|
+
|
|
265
|
+
**CSS classes:** `.mjmlText`, `.mjmlText--{variant}`, `.mjmlText--bottomSpacing`.
|
|
266
|
+
|
|
267
|
+
```tsx
|
|
268
|
+
<MjmlText variant="heading" bottomSpacing>Large heading with spacing</MjmlText>
|
|
269
|
+
<MjmlText variant="body">Regular body text</MjmlText>
|
|
270
|
+
<MjmlText>Uses defaultVariant if set in theme</MjmlText>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Variant styles merge on top of base theme text styles — properties not set by the variant inherit from the base.
|
|
274
|
+
|
|
275
|
+
### HtmlText
|
|
276
|
+
|
|
277
|
+
Themed text for use inside ending tags (`MjmlText`, `MjmlRaw`) or custom HTML structures where MJML components can't be used. Renders a plain HTML element.
|
|
278
|
+
|
|
279
|
+
**CSS classes:** `.htmlText`, `.htmlText--{variant}`, `.htmlText--bottomSpacing`.
|
|
280
|
+
|
|
281
|
+
```tsx
|
|
282
|
+
<MjmlRaw>
|
|
283
|
+
<table>
|
|
284
|
+
<tr>
|
|
285
|
+
<HtmlText variant="body">Themed text inside a raw table</HtmlText>
|
|
286
|
+
</tr>
|
|
287
|
+
</table>
|
|
288
|
+
</MjmlRaw>
|
|
289
|
+
|
|
290
|
+
<MjmlText>
|
|
291
|
+
<HtmlText element="div" variant="caption">Rendered as a div</HtmlText>
|
|
292
|
+
</MjmlText>
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Bottom Spacing
|
|
296
|
+
|
|
297
|
+
Use `bottomSpacing` to add consistent vertical spacing below text elements:
|
|
298
|
+
|
|
299
|
+
```tsx
|
|
300
|
+
<MjmlText bottomSpacing>First paragraph with spacing below</MjmlText>
|
|
301
|
+
<MjmlText bottomSpacing>Second paragraph with spacing below</MjmlText>
|
|
302
|
+
<MjmlText>Last paragraph, no extra spacing</MjmlText>
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
The base spacing value comes from `theme.text.bottomSpacing`. Variants can override it individually with their own `bottomSpacing` property (which also supports responsive values).
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## HtmlInlineLink
|
|
310
|
+
|
|
311
|
+
`<a>` element for use inside `MjmlText` or `HtmlText`. Inherits parent's font styles — even on Outlook Desktop, which normally overrides link typography with its own defaults.
|
|
312
|
+
|
|
313
|
+
**CSS class:** `.htmlInlineLink`.
|
|
314
|
+
|
|
315
|
+
```tsx
|
|
316
|
+
<MjmlText variant="body">
|
|
317
|
+
Visit our <HtmlInlineLink href="https://example.com">website</HtmlInlineLink> for more.
|
|
318
|
+
</MjmlText>
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Outlook Workaround
|
|
322
|
+
|
|
323
|
+
Outlook Desktop ignores `<style>` blocks and applies its own "Hyperlink" style to `<a>` tags, overriding inherited CSS. `HtmlInlineLink` counters this by setting explicit inline styles for font properties (sourced from the parent text component's context). On modern clients, a responsive CSS reset ensures the link adapts when responsive variant overrides apply.
|
|
324
|
+
|
|
325
|
+
### Custom Color
|
|
326
|
+
|
|
327
|
+
Use `!important` when setting a custom link color — the responsive reset uses `inherit !important`, which would otherwise take precedence:
|
|
328
|
+
|
|
329
|
+
```tsx
|
|
330
|
+
<HtmlInlineLink href="https://example.com" style={{ color: "#0066cc !important" }}>
|
|
331
|
+
link text
|
|
332
|
+
</HtmlInlineLink>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Image
|
|
338
|
+
|
|
339
|
+
`MjmlImage` and `HtmlImage` are responsive — the image scales down to fit narrow viewports.
|
|
340
|
+
|
|
341
|
+
**CSS classes:** `.mjmlImage`, `.htmlImage`.
|
|
342
|
+
|
|
343
|
+
## Divider
|
|
344
|
+
|
|
345
|
+
Themed horizontal line, styled from `theme.divider` (base styles plus variants). Falls back to a built-in default when no theme is in scope; only `variant` requires a theme.
|
|
346
|
+
|
|
347
|
+
- **`MjmlDivider`** — inside `MjmlColumn`. Classes `.mjmlDivider`, `.mjmlDivider--{variant}`.
|
|
348
|
+
- **`HtmlDivider`** — inside ending tags (`MjmlRaw`) or raw HTML. Classes `.htmlDivider`, `.htmlDivider--{variant}`.
|
|
349
|
+
|
|
350
|
+
```tsx
|
|
351
|
+
<MjmlDivider variant="thick" />
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Button
|
|
357
|
+
|
|
358
|
+
Themed button, styled from `theme.button` (base styles plus variants). Falls back to a built-in default when no theme is in scope; only `variant` requires a theme.
|
|
359
|
+
|
|
360
|
+
- **`MjmlButton`** — inside `MjmlColumn`. Classes `.mjmlButton`, `.mjmlButton--{variant}`, `.mjmlButton--fullWidth`.
|
|
361
|
+
- **`HtmlButton`** — inside ending tags (`MjmlRaw`) or any non-MJML context. Classes `.htmlButton`, `.htmlButton--{variant}`, `.htmlButton--fullWidth`.
|
|
362
|
+
|
|
363
|
+
`theme.button.padding` is the inner spacing around the label; `MjmlButton`'s `padding` prop is the outer spacing. `fullWidth` makes the button span its container. A gradient `backgroundImage` overlays the solid `backgroundColor`, which stays the fallback for clients that drop `background-image` (Outlook). Outlook ignores `border-radius`, so rounded buttons render with square corners there.
|
|
364
|
+
|
|
365
|
+
```tsx
|
|
366
|
+
<MjmlButton variant="primary" fullWidth href="https://example.com">
|
|
367
|
+
Click me
|
|
368
|
+
</MjmlButton>
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## Scoped Theming
|
|
374
|
+
|
|
375
|
+
`ThemeProvider` applies a different theme to a subtree. Common use: dark-background sections.
|
|
376
|
+
|
|
377
|
+
**Prefer `MjmlWrapper` when only the background color changes.** Reach for `ThemeProvider` when text color, variants, or other theme values also need to differ — cloning a theme is overkill for a background-only change.
|
|
378
|
+
|
|
379
|
+
```tsx
|
|
380
|
+
import { ThemeProvider } from "@dextinity/mail-react";
|
|
381
|
+
import { theme } from "./theme";
|
|
382
|
+
|
|
383
|
+
const darkSectionTheme = {
|
|
384
|
+
...theme,
|
|
385
|
+
colors: {
|
|
386
|
+
...theme.colors,
|
|
387
|
+
background: {
|
|
388
|
+
...theme.colors.background,
|
|
389
|
+
content: "#1A1A2E",
|
|
390
|
+
},
|
|
391
|
+
},
|
|
392
|
+
text: {
|
|
393
|
+
...theme.text,
|
|
394
|
+
color: "#FFFFFF",
|
|
395
|
+
},
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
function EmailWithDarkFooter() {
|
|
399
|
+
return (
|
|
400
|
+
<>
|
|
401
|
+
<MjmlSection indent>
|
|
402
|
+
<MjmlColumn>
|
|
403
|
+
<MjmlText>Regular content</MjmlText>
|
|
404
|
+
</MjmlColumn>
|
|
405
|
+
</MjmlSection>
|
|
406
|
+
|
|
407
|
+
<ThemeProvider theme={darkSectionTheme}>
|
|
408
|
+
<MjmlSection indent>
|
|
409
|
+
<MjmlColumn>
|
|
410
|
+
<MjmlText>Dark footer with white text</MjmlText>
|
|
411
|
+
</MjmlColumn>
|
|
412
|
+
</MjmlSection>
|
|
413
|
+
</ThemeProvider>
|
|
414
|
+
</>
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
`ThemeProvider` **replaces** the theme — it does not merge with the parent. Spread the root theme and override only what needs to change to preserve settings like font family, variants, and breakpoints.
|
|
420
|
+
|
|
421
|
+
Theme-aware `registerStyles` entries always resolve against the **root theme** from `MjmlMailRoot`, not nested `ThemeProvider` scopes.
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## MJML Component Re-exports
|
|
426
|
+
|
|
427
|
+
`@dextinity/mail-react` re-exports all MJML components from `@faire/mjml-react`. Consumers import everything from `@dextinity/mail-react` — never from `@faire/mjml-react` directly.
|
|
428
|
+
|
|
429
|
+
Common re-exports: `MjmlColumn`, `MjmlSpacer`, `MjmlTable`, `MjmlRaw`, `MjmlGroup`, `MjmlAttributes`, `MjmlAll`, `MjmlClass`, `MjmlStyle`, `MjmlComment`, `MjmlConditionalComment`.
|
|
430
|
+
|
|
431
|
+
For the full MJML tag reference: https://documentation.mjml.io/
|