Expose InfoListItemProps on DrawerNavItem #252
Labels
brightlayer-ui
Used to identify Brightlayer UI platform issues for easy filtering
enhancement
Request for improvement or new feature
Milestone
Describe the desired behavior
Add a new prop called
InfoListItemProps
to theDrawerNavItem
component. The property should be passed through to the underlying InfoListItem component so that users can update additional props on the InfoListItem through the DrawerNavItem.See the additional context items below for details on implementation and be sure to remove the hardcoded
testId
andaccessibilityLabel
that was added on theInfoListItem
TouchableOpacity
component as a quick solution for this.Describe the current behavior
Currently, some of the properties of the InfoListItem are not exposed through the DrawerNavItem. In particular, this issue arose from a need to apply a
testID
to the underlying TouchableOpacity to simulate clicks in an E2E test suite.Is this request related to a current issue?
Yes, as per above, this is related to being able to set a testID on the TouchableOpacity for E2E testing.
Additional Context
You can read some of the initial discussion around this issue on this PR: https://github.com/brightlayer-ui/react-native-component-library/pull/251
This functionality has already been implemented in the React components. You can refer to the implementation there as a guide: https://github.com/brightlayer-ui/react-component-library/blob/dev/components/src/core/Drawer/DrawerNavItem/DrawerNavItem.tsx#L95
This may require additional tweaks in the InfoListItem to properly apply any of these props.
The text was updated successfully, but these errors were encountered: