10.1.0
@dextinity/mail-react@10.1.0
Minor Changes
-
b0577d5: Add
listto the RichText block'sblockTypes, so a custom block type renders as a listUse it for a list in more than one text variant. A draft block has only one block type, so each variant needs a block type of its own.
Example
export const { MjmlRichTextBlock, HtmlRichTextBlock } = createRichTextBlock({ blockTypes: { "unordered-list-item": { variant: "copy" }, "unordered-list-item-large": { variant: "copyLarge", list: "unordered" }, "ordered-list-item-large": { variant: "copyLarge", list: "ordered" }, }, });
For backward compatibility,
unordered-list-itemandordered-list-itemstill render as lists withoutlist.