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

6.0.0-rc.6 Typescript props types are mixing with return types #4053

Closed
nksfrank opened this issue Jun 25, 2023 · 0 comments · Fixed by #4054
Closed

6.0.0-rc.6 Typescript props types are mixing with return types #4053

nksfrank opened this issue Jun 25, 2023 · 0 comments · Fixed by #4054
Assignees
Labels
6.0 proposals for the next major of styled-components bug 🐛

Comments

@nksfrank
Copy link
Contributor

nksfrank commented Jun 25, 2023

Environment

System:

  • OS: Windows 10 10.0.22621
  • CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
  • Memory: 32.90 GB / 63.91 GB

Binaries:

  • Node: 18.7.0 - ~\AppData\Local\Volta\tools\image\node\18.7.0\node.EXE
  • Yarn: 1.22.19 - ~\AppData\Local\Volta\tools\image\yarn\1.22.19\bin\yarn.CMD
  • npm: 8.15.0 - ~\AppData\Local\Volta\tools\image\node\18.7.0\npm.CMD

npmPackages:

  • styled-components: 6.0.0-rc.6 => 6.0.0-rc.6

Reproduction

https://codesandbox.io/s/ecstatic-lederberg-y7ldwp

Steps to reproduce

Running latest release candidate, types seems to cause issues with mixing props with return type

Expected Behavior

props type is not mixed with return type, as with <Text> where components own color prop is breaking css color type.
extending a styled component shall not require base components props to be defined in the returned object, as with <ExtendingText> and <StyledText>

Actual Behavior

Incoming prop types are overriding the returned styling prop. a property. with the same name as the css property, with string literals gives and error.
extending a styled component requires all base components props to be defined in the style that is returned.

quantizor added a commit that referenced this issue Jun 25, 2023
This branch will fix #4053
@quantizor quantizor added bug 🐛 6.0 proposals for the next major of styled-components labels Jun 25, 2023
@quantizor quantizor self-assigned this Jun 25, 2023
quantizor added a commit that referenced this issue Jun 25, 2023
quantizor added a commit that referenced this issue Jun 25, 2023
quantizor added a commit that referenced this issue Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.0 proposals for the next major of styled-components bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants