react-email icon indicating copy to clipboard operation
react-email copied to clipboard

TailwindConfig type changed in react-email 3.0

Open razzeee opened this issue 1 year ago • 4 comments

Describe the Bug

Setting a config for tailwind errors out with the 3.0 release

https://github.com/flathub-infra/website/pull/3763

https://github.com/flathub-infra/website/actions/runs/10522369333/job/29154863956?pr=3763

Run yarn build
Error: emails/base.tsx(57,9): error TS2740: Type '{ theme: { extend: { colors: { "flathub-celestial-blue": string; }; }; }; }' is missing the following properties from type 'TailwindConfig': prefix, important, separator, safelist, and 7 more.
Error: Process completed with exit code 2.

Which package is affected (leave empty if unsure)

@react-email/tailwind

Link to the code that reproduces this issue

https://github.com/flathub-infra/website/pull/3763

To Reproduce

Try to use

<Tailwind
        config={{
          theme: {
            extend: {
              colors: {
                "flathub-celestial-blue": "hsl(211, 65%, 57%)",
              },
            },
          },
        }}
      >

Expected Behavior

It should probably still keep working as it is. Otherwise, there should have been instructions on the change and the docs on the website also would need an update.

What's your node version? (if relevant)

No response

razzeee avatar Aug 23 '24 10:08 razzeee