|
| 1 | +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
| 2 | + |
| 3 | +exports[`create-mail > command 1`] = ` |
| 4 | +" |
| 5 | +create-mail |
| 6 | +
|
| 7 | +The fastest way to get started with JSX Email |
| 8 | +
|
| 9 | +
|
| 10 | +Creating Project at: .test/new/templates |
| 11 | +Creating a new template at: .test/new/templates/email.tsx |
| 12 | +
|
| 13 | +✓ jsx-email Project Created |
| 14 | +
|
| 15 | +Next, run: |
| 16 | +
|
| 17 | + $ cd email-project |
| 18 | + $ pnpm install |
| 19 | + $ pnpm run dev |
| 20 | +
|
| 21 | +Check out the docs! http://jsx.email/docs/quick-start |
| 22 | +" |
| 23 | +`; |
| 24 | + |
| 25 | +exports[`create-mail > command 2`] = ` |
| 26 | +"import { |
| 27 | + Body, |
| 28 | + Button, |
| 29 | + Container, |
| 30 | + Head, |
| 31 | + Hr, |
| 32 | + Html, |
| 33 | + Link, |
| 34 | + Preview, |
| 35 | + Section, |
| 36 | + Text |
| 37 | +} from 'jsx-email'; |
| 38 | +
|
| 39 | +interface TemplateProps { |
| 40 | + email: string; |
| 41 | + name: string; |
| 42 | +} |
| 43 | +
|
| 44 | +const main = { |
| 45 | + backgroundColor: '#f6f9fc', |
| 46 | + fontFamily: |
| 47 | + '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif' |
| 48 | +}; |
| 49 | +
|
| 50 | +const container = { |
| 51 | + backgroundColor: '#ffffff', |
| 52 | + margin: '0 auto', |
| 53 | + marginBottom: '64px', |
| 54 | + padding: '20px 0 48px' |
| 55 | +}; |
| 56 | +
|
| 57 | +const box = { |
| 58 | + padding: '0 48px' |
| 59 | +}; |
| 60 | +
|
| 61 | +const hr = { |
| 62 | + borderColor: '#e6ebf1', |
| 63 | + margin: '20px 0' |
| 64 | +}; |
| 65 | +
|
| 66 | +const paragraph = { |
| 67 | + color: '#777', |
| 68 | + fontSize: '16px', |
| 69 | + lineHeight: '24px', |
| 70 | + textAlign: 'left' as const |
| 71 | +}; |
| 72 | +
|
| 73 | +const anchor = { |
| 74 | + color: '#777' |
| 75 | +}; |
| 76 | +
|
| 77 | +const button = { |
| 78 | + fontWeight: 'bold', |
| 79 | + padding: '10px', |
| 80 | + textDecoration: 'none' |
| 81 | +}; |
| 82 | +
|
| 83 | +export const previewProps: TemplateProps = { |
| 84 | + |
| 85 | + name: 'Bruce Wayne' |
| 86 | +}; |
| 87 | +
|
| 88 | +export const templateName = 'email-project'; |
| 89 | +
|
| 90 | +export const Template = ({ email, name }: TemplateProps) => ( |
| 91 | + <Html> |
| 92 | + <Head /> |
| 93 | + <Preview>This is our email preview text for {name} <{email}></Preview> |
| 94 | + <Body style={main}> |
| 95 | + <Container style={container}> |
| 96 | + <Section style={box}> |
| 97 | + <Text style={paragraph}>This is our email body text</Text> |
| 98 | + <Button |
| 99 | + align={'center'} |
| 100 | + backgroundColor={'#777'} |
| 101 | + borderRadius={5} |
| 102 | + fontSize={16} |
| 103 | + height={60} |
| 104 | + href="https://example.com" |
| 105 | + style={button} |
| 106 | + textColor={'#fff'} |
| 107 | + width={160} |
| 108 | + > |
| 109 | + Action Button |
| 110 | + </Button> |
| 111 | + <Hr style={hr} /> |
| 112 | + <Text style={paragraph}> |
| 113 | + This is text content with a{' '} |
| 114 | + <Link style={anchor} href="mailto:{email}"> |
| 115 | + link |
| 116 | + </Link> |
| 117 | + . |
| 118 | + </Text> |
| 119 | + </Section> |
| 120 | + </Container> |
| 121 | + </Body> |
| 122 | + </Html> |
| 123 | +); |
| 124 | +" |
| 125 | +`; |
| 126 | + |
| 127 | +exports[`create-mail > command 3`] = ` |
| 128 | +[ |
| 129 | + ".test/new/.gitignore", |
| 130 | + ".test/new/README.md", |
| 131 | + ".test/new/package.json", |
| 132 | + ".test/new/tsconfig.json", |
| 133 | + ".test/new/templates/email.tsx", |
| 134 | +] |
| 135 | +`; |
0 commit comments