-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Styles override doesn't work properly #804
Comments
The To achieve the expected effect I recommend using a |
@pawelblaszczyk5 mmm, what i want is to be able to override existing styles from outside the component in a simple way; i guess that the pattern is something that is already predefined. |
I think it depends on an exact use case, you can create a custom pattern if you want a full flexibility. You can also create recipe if you want some predefined variants. I know it's not a direct answer to your question, but usually your components shouldn't have a fully modifiable styles from the outside 😃 If you could point me to an example use case I could try to provide some better explanation/solution |
Hi @Emiliano-Bucci, The |
@segunadebayo Hi! I reopen because i have a doubt: is correct that this doesn't work as expected? -> https://stackblitz.com/edit/vitejs-vite-3qw93q?file=src%2FApp.tsx&terminal=dev Should i always pass the prop Thanks! |
@Emiliano-Bucci your example is against how Panda works. Panda can't know that those styles in the |
Description
It seems that when trying to override styles from outside a component using the
cx()
utility to merge internal and external classes, the ones that should override the internal ones doesn't work. It seems that if the className arrives from an external prop it doesn't work properly, but if the classNames are defined internally, it does.Link to Reproduction
https://stackblitz.com/edit/vitejs-vite-2cufqt?file=src%2FApp.tsx,src%2FComp.tsx&terminal=dev
Steps to reproduce
JS Framework
React
Panda CSS Version
0.4.0
Browser
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: