react-to-html
Version:
A react package to generate HTML for conversion to Email or PDF from shared components
17 lines (14 loc) • 416 B
text/typescript
// Definition of the types used in the project
export interface ComponentSettings {
path: string;
props: Record<string, any>;
}
export interface SettingsType {
content: ComponentSettings[];
pageHeight?: string;
pageWidth?: string;
outputDir?: string;
outputFormat: "minified" | "pretty";
decorator?: DecoratorFunction;
}
export type DecoratorFunction = (content: string, styles: string) => string;