better-svelte-email
Version:
Svelte email renderer with Tailwind support
40 lines (39 loc) • 1.22 kB
TypeScript
/**
* Convert a style object to a CSS string
* @param style - Object containing CSS properties
* @returns CSS string with properties
*/
export declare function styleToString(style: Record<string, string | number | undefined>): string;
/**
* Convert pixels to points for email clients
* @param px - Pixel value as string
* @returns Point value as string
*/
export declare function pxToPt(px: string | number): string;
export type Margin = {
m?: string;
mx?: string;
my?: string;
mt?: string;
mr?: string;
mb?: string;
ml?: string;
};
/**
* Convert margin props to a CSS style object
* @param props - Margin properties object with shorthand notation (m, mx, my, mt, mr, mb, ml)
* @returns Style object with margin properties in pixels
*/
export declare function withMargin(props: Margin): any;
/**
* Combine multiple styles into a single string
* @param styles - Array of style strings
* @returns Combined style string
*/
export declare function combineStyles(...styles: (string | undefined | null)[]): string;
/**
* Render HTML as plain text
* @param markup - HTML string
* @returns Plain text string
*/
export declare const renderAsPlainText: (markup: string) => string;