UNPKG

react-letter

Version:

Display e-mail messages in your React projects.

41 lines (40 loc) 1.14 kB
import React from 'react'; export interface LetterProps { /** * The HTML to use and sanitize. */ html: string; /** * Fallback text if HTML is empty. */ text?: string; /** * Should the HTML be wrapped in an iframe. Default: false. */ useIframe?: boolean; /** * Iframe title, usually set to subject of the message. */ iframeTitle?: string; /** * The result of this function will be used to rewrite the URLs for url(...) in CSS and src attributes in HTML. */ rewriteExternalResources?: (url: string) => string; /** * The result of this function will be used to rewrite the URLs for href attributes in HTML. */ rewriteExternalLinks?: (url: string) => string; /** * URL schemas allowed in src=, href= and url(). Default: ['http', 'https', 'mailto']. */ allowedSchemas?: string[]; /** * Class name of the wrapper div. */ className?: string; /** * Preserves CSS priority (!important), default: true. */ preserveCssPriority?: boolean; } export declare const Letter: React.FC<LetterProps>;