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

Stitches can generate it's own types, no need for duplication #1

Closed
andrewdoro opened this issue Sep 29, 2022 · 1 comment
Closed

Comments

@andrewdoro
Copy link

Stitches has implemented different ways to infer the types such as Stitches.VariantProps<>. The issue with this is that you lose auto-infer of params for storybook.
There is a workaround using this snippet:
https://gist.github.com/f1lander/db2a9a95a4442e1e98217001ab724d3f

https://github.com/diegosilvatech/awesome-template-stitches/blob/9086dc1c2d414e77cb219746a53df88c9730a4d3/src/components/button/Button.tsx#L3-L16

@eudiegosilva
Copy link
Owner

Hi @andrewdoro. Thanks for this Issue.

I will check this issue soon. At the moment Storybook can interpret all the properties of my component automatically and everything seems to work as expected.

At the moment this is a side project and things can take a little time, but if you prefer, you can open a PR with your proposal.

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

No branches or pull requests

2 participants