react-to-html
Version:
A react package to generate HTML for conversion to Email or PDF from shared components
13 lines (12 loc) • 359 B
TypeScript
export interface ComponentSettings {
path: string;
props: Record<string, any>;
}
export interface SettingsType {
content: ComponentSettings[];
pageHeight?: string;
pageWidth?: string;
outputFormat: "minified" | "pretty";
decorator?: DecoratorFunction;
}
export type DecoratorFunction = (content: string, styles: string) => string;