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

BottomSheetHeader defaultTextColor #31

Open
andrewworld opened this issue Oct 3, 2017 · 3 comments
Open

BottomSheetHeader defaultTextColor #31

andrewworld opened this issue Oct 3, 2017 · 3 comments

Comments

@andrewworld
Copy link

andrewworld commented Oct 3, 2017

In JS code you has property textColor, but in Java code you use highlightColor in BottomSheetHeader component. There is no default text color setter in your component.

@cesardeazevedo
Copy link
Owner

Yes indeed, the textColor was left behind, i am using the highlightColor prop as the actual default text color of the <Text /> component, and only using the textColorExpanded to set the expanded color.

That is how it works.

  • When expanded, All <Text /> components on the header will be set to the textColorExpanded color.
  • When collapsed, All <Text /> components returns to the original color which was set on highlightColor prop.

So this means that each can have a different default color when collapsed, but they can only have one color when expanded.

The highlightColor is a work around that i found when trying to get the color from the styles directly.

I remember posting this doubt on stack-overflow, but i never got any answer.
https://stackoverflow.com/questions/43061034/how-to-get-style-props-on-the-native-side-in-react-native

Please, feel free to send me a pull request removing the textColor prop.

Thanks for report.

@andrewworld
Copy link
Author

I think you shouldn't remove textColor prop. Temporarily, it will be better to make it work, like textColorExpanded works, until you'll find out how to use colors from styles.

@cesardeazevedo
Copy link
Owner

It will doesn't work because each <Text /> component inside can start with a different colors from each other when collapsed, but only one color when expanded, and i cannot add textColorCollapsed to a ReactTextView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants