diff --git a/apps/web/src/app/editor/email-theming/example.tsx b/apps/web/src/app/editor/email-theming/example.tsx index b4d87936f1..6525e04ef5 100644 --- a/apps/web/src/app/editor/email-theming/example.tsx +++ b/apps/web/src/app/editor/email-theming/example.tsx @@ -17,15 +17,20 @@ const initialContent = { content: [ { type: 'heading', - attrs: { level: 2 }, + attrs: { level: 1 }, content: [{ type: 'text', text: 'Welcome to our newsletter' }], }, + { + type: 'heading', + attrs: { level: 2 }, + content: [{ type: 'text', text: 'The new release is live' }], + }, { type: 'paragraph', content: [ { type: 'text', - text: 'This is a themed email editor. Toggle between Basic, Minimal, and Custom themes to see how styles change.', + text: 'This editor showcases the built-in themes abstracted from the react-email demo templates (Barebone, Matte, Protocol, Arcane, Studio) alongside the original Basic, Minimal, and a Custom example.', }, ], }, @@ -34,10 +39,15 @@ const initialContent = { content: [ { type: 'text', - text: 'Try editing this content and switching themes to see the difference.', + text: 'Switch between themes to see how the container, typography, links, and buttons change.', }, ], }, + { + type: 'button', + attrs: { url: 'https://react.email' }, + content: [{ type: 'text', text: 'Read the docs' }], + }, ], }; @@ -55,16 +65,40 @@ const customTheme = extendTheme('basic', { }, }); -type ThemeOption = 'basic' | 'minimal' | 'custom'; +type ThemeOption = + | 'basic' + | 'minimal' + | 'barebone' + | 'matte' + | 'protocol' + | 'arcane' + | 'studio' + | 'custom'; const themeMap: Record = { basic: 'basic', minimal: 'minimal', + barebone: 'barebone', + matte: 'matte', + protocol: 'protocol', + arcane: 'arcane', + studio: 'studio', custom: customTheme, }; +const themeOrder: ThemeOption[] = [ + 'basic', + 'minimal', + 'barebone', + 'matte', + 'protocol', + 'arcane', + 'studio', + 'custom', +]; + export function EmailThemingExample() { - const [selected, setSelected] = useState('basic'); + const [selected, setSelected] = useState('barebone'); const contentRef = useRef(initialContent); const theme = themeMap[selected]; @@ -83,10 +117,10 @@ export function EmailThemingExample() { return ( -
- {(['basic', 'minimal', 'custom'] as const).map((option) => ( +
+ {themeOrder.map((option) => (