Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind preset is not compatible with Theme TypeScript type #1139

Closed
schickling opened this issue Aug 18, 2020 · 2 comments · Fixed by #1243
Closed

Tailwind preset is not compatible with Theme TypeScript type #1139

schickling opened this issue Aug 18, 2020 · 2 comments · Fixed by #1243
Labels

Comments

@schickling
Copy link

Describe the bug

The Tailwind preset is not compatible with Theme TypeScript type.

To Reproduce
Steps to reproduce the behavior:

  1. Copy & paste the JSON theme definition and assign it to a variable with type Theme (via import { Theme } from 'theme-ui')
  2. Watch out for type errors (Note: There are more TypeScript errors once you've fixed/commented out the initially reported errors)

Here is a repo on CSB: https://codesandbox.io/s/repro-theme-ui-tailwind-typescript-olnsp

Expected behavior

The presets should be compatible with the Theme type.

Screenshots

image

@atanasster
Copy link
Collaborator

Hi, @schickling

Can you please try https://github.com/atanasster/theme-ui/blob/tailwind-preset-typescript/packages/preset-tailwind/src/index.ts

If it looks good, we can submit it as a PR.

@hasparus - I suspect most other themes will also need to be updated. New themes created will probably use those as templates.

@lachlanjc lachlanjc added the types label Dec 2, 2020
@lachlanjc lachlanjc linked a pull request Dec 6, 2020 that will close this issue
@lachlanjc
Copy link
Member

This should be fixed between those PRs & #1862!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants