/** * Default color scheme for email templates in light and dark modes. * * Provides a consistent color palette that can be customized via the EmailColors type. */ export const defaultColors = { light: { background: "#F5F5F5", border: "#E5E5E5", card: "#FFFFFF", cardForeground: "#0A0A0A", foreground: "#262626", muted: "#F5F5F5", mutedForeground: "#737373", primary: "#171717", primaryForeground: "#FAFAFA" }, dark: { background: "#0A0A0A", border: "#2E2E2E", card: "#171717", cardForeground: "#FAFAFA", foreground: "#D4D4D4", muted: "#212121", mutedForeground: "#A1A1A1", primary: "#E5E5E5", primaryForeground: "#171717" } } /** * Custom CSS class names for styling different parts of email templates. * * Allows fine-grained control over the appearance of email components. */ export type EmailClassNames = { body?: string container?: string card?: string logo?: string title?: string content?: string button?: string description?: string separator?: string link?: string poweredBy?: string codeBlock?: string } /** * Custom color scheme configuration for email templates. * * Supports separate color definitions for light and dark modes. * Any color not specified will fall back to the defaultColors values. */ export type EmailColors = { light?: Partial dark?: Partial } /** * Props for the EmailStyles component. */ interface EmailStylesProps { /** Custom color scheme for light and dark modes */ colors?: EmailColors /** Whether to enable dark mode support */ darkMode?: boolean } /** * Component that injects CSS styles for email templates with support for light and dark modes. * * Generates inline styles that adapt to the user's color scheme preference and applies * custom colors if provided. Handles logo visibility switching between light and dark modes. * * @param props - Style configuration options * @returns A style element containing CSS for email template theming * * @example * ```tsx * * ``` */ export const EmailStyles = ({ colors, darkMode = true }: EmailStylesProps) => { return ( ) } export default EmailStyles