-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to use themes to style components that are children of NativeBase.List #2281
Comments
@chris-divvito Did you read issue guidelines, while creating issue and tried http://nativebase.io/customizer/? |
@SupriyaKalghatgi I did read the guidelines, and I am not sure that the customizer is relevant here? it's unable to reproduce the kind of styling I am speaking about in the issue. |
@chris-divvito Did you find this working? |
Nope, not without the workaround as stated in the original issue posting |
@chris-divvito In App.js
In ListItem.js of native-base-theme/components
It means inside of a ListItem component, if we have to style Text component, then it will have fontWeight:200 and color of Text will be 'red' ...Again if we want to style Text within a Button inside of a ListItem component, we set a different style for it as above...It works... |
Closing the issue due to no response for a while...Hope your issue has been resolved.You can reopen the issue if you still feel the issue is exclusive to "native-base"... |
Expected behaviour
Able to theme components through the normal means (ejected theme)
Actual behaviour
Unable to style any components descending from a List
Steps to reproduce
An example layout:
An example theme in
Content.js
of an ejected theme:Neither the colour, nor the background colour are applied to their respective elements.
Is the bug present in both iOS and Android or in any one of them?
Both
Any other additional info which would help us debug the issue quicker.
After fighting this all afternoon, I at least have a way around the issue - It appears there is no theme for the List component, at least in the theme ejected from my current version. This causes... something... to go wrong when shoutem compiles the themes down based on the parentPath.
I added an empty theme to the ejected theme to get this working - that is I added the file
List.js
to the theme folder:and in
index.js
added:but this doesn't do the trick on it's own. I didn't dig deep enough to found out where, but somewhere in the depths of NativeBase and/or shoutem something must be checking for empty objects and filtering them out, because in order for this to work I had to change
List.js
to:Any other property at all works fine, a long as there is at least one property in the resulting object.
The text was updated successfully, but these errors were encountered: