-
Notifications
You must be signed in to change notification settings - Fork 33
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
Override style not working #21
Comments
This is normal operation. This package doesn't unite values. So if you want to use globally the second version ( {[TextInput.defaultProps.style, {color: "red"}]} ), then you have to create your own CustomTextInput component to achieve style integration. In many cases this package is useful ecxept when you have to write your own component. |
Nop... what I want is to use a general style globally, achieved with:
That worked perfectly, borders and padding and the rest of the styles are applied correctly. But I only want to override the style for some inputs in some specific views (for example change color to red), but having the same borders, padding, and the rest of the "global" styles... If I do:
The global styles are gone, no border, no padding... Is this the intended behavior? |
No, that seems like a bug. It should merge the style props. |
@backendbyyuto found any solution ? |
To anyone experiencing this issue, it seems this only happens when Hermes is enabled. it worked as expected when I disabled Hermes in the project. |
Is there any plan to make it work with Hermes please ? |
Can confirm @cinnamonpon |
I experienced same problem... I just wanted to use conditional merge, as before i did, but it didn't work, my code example is like below : |
Hello, I did:
If I write:
The global styles are applied correctly
But if I try to override one property of the style for a particular TextInput, the global styles dissapear, for example writting:
It only apply the red color, and the rest of the style is gone. No border, no padding, etc.
What I'm doing wrong?
If I do:
It worked as expected... But then... whats the point using this library?
Can you help me please?
The text was updated successfully, but these errors were encountered: