-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Bugs around styled-components 4.0 beta #347
Comments
styled-components v4 somehow broke my app's navigation as well as extending on base styles didn't seem to work. No console errors or logs. I don't think it's related to docz though. |
For me docz is not reading propTypes from styled components.
Link.mdx
dev mode |
This problem is related to docgen parser, duplicated from #240 and all that depends of resolve this docgen bug 😕 |
@pedronauck even the rendering issue with styled-components? |
Sorry @eramdam, the rendering issue isn't a bug from react-docgen, I'll keep this openning 🙏 |
this is a real gotcha issue. i resolve it as follows: // Link is a styled components
const LinkWrapper = (props)=>(
<Link {...props}/>
)
// docz reading propTypes from LinkWrapper
LinkWrapper.propTypes = {
//props
}
export default LinkWrapper |
Any follow up on this issue? |
I'm closing this issue now in favor of the new one, most of the problems have been solved and are working now, but some others appeared. |
Bug Report
Some features of styled-components 4.0.0 beta are broken when used inside a Docz document.
I would open a bug to SC directly but the same code works fine in react-styleguidist so I'm not quite sure where I should open the issue.
The bugs seems to be mainly around the
styled()
syntax of styled-components. Which I assume got changed a bit internally with 4.x.Considering this file
https://github.com/eramdam/docz-repro-error/blob/master/test/hello.tsx
Here is how it's supposed to look (and how it looks under styled-components 3.x):
Here is how it looks with styled-components 4.x installed:
Feel free to clone https://github.com/eramdam/docz-repro-error and alternate between the
master
branch (4.x) andsc-v3
(3.x) to try.I'd be happy to provide more details if needed.
The text was updated successfully, but these errors were encountered: