Add support for ListItem underlayColor
See original GitHub issueBefore filling out an issue, be sure to check the version of react-native-elements you are using and the docs for that version over here.
Explain what you did
I added the underlayColor option to a ListItem. Because I am using the onPress function, react-native-elements renders a TouchableHighlight for the component, but underlayColor is not an exposed property in the type signature.
Expected behaviour
I expect to be able to add underlayColor to a ListItem when it is rendering as a TouchableHighlight (or any other component that accepts an underlayColor attribute).
Describe the bug I see a type error, but the code itself executes fine. The bug is only in what appears to be inconsistent typings.
Possible Solution I believe there is a way with TypeScript to allow that property if and only if the underlying component supports it, but I’m not quite sure how to tackle that. @iRoachie mentioned he may be able to help guide me through the type annotations.
Your Environment (please complete the following information):
| software | version |
|---|---|
| react-native-elements | 1.0.0 |
| react-native | https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz |
| npm or yarn | yarn |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7

Top Related StackOverflow Question
Just set
underlayColorprop https://snack.expo.io/@roach_iam/honest-salsaJust merged in a fix for this. Will be available in 1.2.0