ToReactNodesOptions

shopify-html · /index·type

Options accepted by that let callers substitute custom React components for specific HTML tags during conversion.

Properties

components?
Partial<Record<keyof JSX.IntrinsicElements, ElementType>>
Override which component to render for a given tag.

Example

toReactNodes(html, {
    components: { a: LinkComponent, img: ResponsiveImage },
});

toPlainText toReactNodes

Metadata@nordcom/commerce-shopify-html@0.0.0Open in GitHub ↗

On this page