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

Variants not recognised by Typescript #217

Closed
afzalsayed96 opened this issue Sep 16, 2020 · 7 comments · Fixed by #218
Closed

Variants not recognised by Typescript #217

afzalsayed96 opened this issue Sep 16, 2020 · 7 comments · Fixed by #218
Labels
bug Something isn't working

Comments

@afzalsayed96
Copy link
Contributor

Bug report

Describe the bug

When composing styled components variant types aren't getting merged properly and not all of them show up in props

To Reproduce

  1. Go to https://codesandbox.io/s/stitches-ts-issue-forked-kevnu?file=/src/App.tsx
  2. Notice that the rounded variant doesn't gets recognised as a prop in IconButton

Expected behavior

When composing styled components variants must get deep merged and available as props in the type definition.

@peduarte peduarte added bug Something isn't working priority: 1 labels Sep 16, 2020
@peduarte
Copy link
Contributor

@afzalsayed96 thanks for raising this. @jjenzz wonder if you may know what's going on?

@peduarte
Copy link
Contributor

peduarte commented Sep 16, 2020

@deebov just wondering (still need to do some digging), but do you think this could be a regression of #166 ?

ignore this, @jjenzz checked and it doesn't seem related

@jjenzz
Copy link
Contributor

jjenzz commented Sep 16, 2020

Fixed here #218

@peduarte
Copy link
Contributor

I'll do some final testing in canary, then release a new canary release before 0.0.3

@afzalsayed96
Copy link
Contributor Author

I just upgraded the sandbox dependency to v0.03 canary and issue still seems to persist. Perhaps updated types weren't published?

@peduarte
Copy link
Contributor

It's because I havent released it yet. I'll leave a comment here when I do, with the version number. You're referring to 0.0.3-canary.0, that's an old release.

@peduarte
Copy link
Contributor

peduarte commented Sep 17, 2020

This is fixed in 0.0.3-canary.1

yarn install @stitches/react@0.0.3-canary.1`

Note, this release contains the following breaking change:

@peduarte peduarte reopened this Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants