-
-
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
Fix the type of Theme
for StyledComponent
#1708
Conversation
🦋 Changeset is good to goLatest commit: b9a5a59 We got this. 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 b9a5a59:
|
@Andarist Another quick question since I'm trying to make my project working with the emotion@next.
|
packages/styled/types/tests.tsx
Outdated
@@ -86,6 +86,7 @@ const Button = styled.button`` | |||
const Input = styled.input` | |||
& + ${Label}: { | |||
margin-left: 3px; | |||
color: ${props => props.theme.primary}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you confirmed that this would be broken without your fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! definetely broken before and fix after 😉
packages/styled/types/tests.tsx
Outdated
@@ -86,6 +86,7 @@ const Button = styled.button`` | |||
const Input = styled.input` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also add one a little bit simpler test that would test this thing alone? this one is testing that Label
can be interpolated as a part of the selector
Interesting, this might be a slight problem with our defined dependencies. Gonna discuss with @mitchellhamilton and release a fix for this later. |
I have prepared a fix for Could you add a changeset to this PR? |
Something like this? (sorry, first time, so I prefer check ^^) Edit: Regarding your other PR, I guess emotion/styled should be enough |
Yes - exactly. You should only list |
cd1c14a
to
9dca980
Compare
I used |
👌 highly recommend it, much better than semantic commits in my opinion. Great especially for monorepos (it manages version bumps between workspace packages), but can be also used for single-package repositories as well. |
Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>
Thanks ❤️ |
…rops (emotion-js#1708) * Fix Theme type * Add unit test for theme type * Extract the Theme test in a separate test * Add changeset * Better changeset Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com> Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
What:
Fix the type of
Theme
for styledComponentWhy:
#1707
How:
Trying to follow the previous resolution from #1632
Checklist:
Theme
must be globally override)