-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add type for as
prop on styled components
#1874
Conversation
🦋 Changeset is good to goLatest commit: 1687cf3 We got this. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1687cf3:
|
This is my first time contributing to Emotion. I have a couple of questions:
|
Just think about for which packages your changes were relevant - this sometimes might include dependents of a package, but sometimes not. In the case of
Honestly, I would prefer not to touch v10 at all, and even more so its types as they are somewhat convoluted. I'm in the process of handling all open issues/PRs so we can ship v11 as soon as possible. V11 doesn't include many substantial breaking changes so I hope the migration should be pretty straightforward. If you manage to backport it to v10 I will consider merging it though (if we decide to merge this one into v11). Sorry for a late review, I'm quite busy and tired lately. @JakeGinnivan this doesn't provide super strict typings for |
Thanks for the notes @Andarist! I've added the changeset. I'm okay to only include this in v11. Backporting to v10 doesn't look too difficult though based on @JakeGinnivan's comment, so if others are interested, I'd be happy to take care of that, too. |
Sorry that it took so long to merge this. Thank you very much for doing preparing this PR @connor-baer ❤️ |
I've discovered one flaw of this approach - |
…on-js#1874) * Add type for as prop * Add changeset * Simplify type for `as` prop * Tweak changeset Co-authored-by: Mateusz Burzyński <[email protected]>
Closes #1137.
What: Add basic type for the
as
prop on styled components.Why: If I add
as
to my component'sExtraProps
the TypeScript compiler complains about theas
prop not existing on the styled component (see #1137 for a full reproduction).How: Add the
as
prop to theCreateStyled
instance inpackages/styled/types/base.d.ts
Checklist: