react-native-bottom-sheet-behavior
react-native-bottom-sheet-behavior copied to clipboard
BottomSheetHeader defaultTextColor
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.
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 thetextColorExpandedcolor. - When collapsed, All
<Text />components returns to the original color which was set onhighlightColorprop.
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.
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.
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.