react-native-bottom-sheet-behavior icon indicating copy to clipboard operation
react-native-bottom-sheet-behavior copied to clipboard

BottomSheetHeader defaultTextColor

Open andrewworld opened this issue 8 years ago • 3 comments

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.

andrewworld avatar Oct 03 '17 12:10 andrewworld

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 <Text /> 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.

cesardeazevedo avatar Oct 07 '17 07:10 cesardeazevedo

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.

andrewworld avatar Oct 24 '17 13:10 andrewworld

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.

cesardeazevedo avatar Oct 24 '17 13:10 cesardeazevedo