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

"as" prop break component restyle #348

Closed
marconucara opened this issue Jul 14, 2021 · 3 comments
Closed

"as" prop break component restyle #348

marconucara opened this issue Jul 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@marconucara
Copy link

If you restyle a component using styled(OriginalComponent) syntax and then you use this restyled component with the prop as goober do not render the class of OriginalComponent, so you loose the original style. If you remove as everything works fine.

Here is an example with both goober component and native component wrapper:

https://codesandbox.io/s/vanilla-forked-re536?file=/src/index.js

@cristianbote cristianbote added the bug Something isn't working label Jul 14, 2021
@cristianbote
Copy link
Owner

Hey, thanks for opening this issue. Do you thing is related to this one #220?

@marconucara
Copy link
Author

I don't thinks so, because if you check the rendered dom in my example you will see an item without two classes when you use the as prop.
I also suggest you to merge the other bug solution anyway, because probably evryone prefer a library with 30b more an 1 bug less.

@cristianbote
Copy link
Owner

Hey! Just checked with #392 https://codesandbox.io/s/vanilla-forked-y0cuc?file=/src/index.js and it works now. Publishing soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants