|
| 1 | +import { wrapWithTailwind } from './component-code-view'; |
| 2 | + |
| 3 | +const code = `<Section className="my-[16px] text-center"> |
| 4 | + <Section className="inline-block w-full max-w-[250px] text-left align-top"> |
| 5 | + <Text className="m-0 font-semibold text-[16px] text-indigo-600 leading-[24px]"> |
| 6 | + What's new |
| 7 | + </Text> |
| 8 | + <Text className="m-0 mt-[8px] font-semibold text-[20px] text-gray-900 leading-[28px]"> |
| 9 | + Versatile Comfort |
| 10 | + </Text> |
| 11 | + <Text className="mt-[8px] text-[16px] text-gray-500 leading-[24px]"> |
| 12 | + Experience ultimate comfort and versatility with our furniture |
| 13 | + collection, designed to adapt to your ever-changing needs. |
| 14 | + </Text> |
| 15 | + <Link className="text-indigo-600 underline" href="https://react.email"> |
| 16 | + Read more |
| 17 | + </Link> |
| 18 | + </Section> |
| 19 | + <Section className="my-[8px] inline-block w-full max-w-[220px] align-top"> |
| 20 | + <Img |
| 21 | + alt="An aesthetic picture taken of an Iphone, flowers, glasses and a card that reads 'Gucci, bloom' coming out of a leathered bag with a ziper" |
| 22 | + className="rounded-[8px] object-cover" |
| 23 | + height={220} |
| 24 | + src="/static/versatile-comfort.jpg" |
| 25 | + width={220} |
| 26 | + /> |
| 27 | + </Section> |
| 28 | +</Section>`; |
| 29 | + |
| 30 | +test('wrapWithTailwind()', () => { |
| 31 | + expect(wrapWithTailwind(code)).toMatchInlineSnapshot(` |
| 32 | + "<Tailwind> |
| 33 | + <Section className="my-[16px] text-center"> |
| 34 | + <Section className="inline-block w-full max-w-[250px] text-left align-top"> |
| 35 | + <Text className="m-0 font-semibold text-[16px] text-indigo-600 leading-[24px]"> |
| 36 | + What's new |
| 37 | + </Text> |
| 38 | + <Text className="m-0 mt-[8px] font-semibold text-[20px] text-gray-900 leading-[28px]"> |
| 39 | + Versatile Comfort |
| 40 | + </Text> |
| 41 | + <Text className="mt-[8px] text-[16px] text-gray-500 leading-[24px]"> |
| 42 | + Experience ultimate comfort and versatility with our furniture |
| 43 | + collection, designed to adapt to your ever-changing needs. |
| 44 | + </Text> |
| 45 | + <Link className="text-indigo-600 underline" href="https://react.email"> |
| 46 | + Read more |
| 47 | + </Link> |
| 48 | + </Section> |
| 49 | + <Section className="my-[8px] inline-block w-full max-w-[220px] align-top"> |
| 50 | + <Img |
| 51 | + alt="An aesthetic picture taken of an Iphone, flowers, glasses and a card that reads 'Gucci, bloom' coming out of a leathered bag with a ziper" |
| 52 | + className="rounded-[8px] object-cover" |
| 53 | + height={220} |
| 54 | + src="/static/versatile-comfort.jpg" |
| 55 | + width={220} |
| 56 | + /> |
| 57 | + </Section> |
| 58 | + </Section> |
| 59 | + </Tailwind>" |
| 60 | + `); |
| 61 | +}); |
0 commit comments