Added an ItemList component to be used throughout the app#36
Added an ItemList component to be used throughout the app#36Jacob-Mayhue wants to merge 3 commits intomainfrom
Conversation
Components/ItemList.tsx
Outdated
| keyExtractor={itemKey} | ||
| renderItem={({ item, index }) => ( | ||
| <View> | ||
| {preItem?.(index)} |
There was a problem hiding this comment.
preItem and postItem are both used as a sort of customizable divider between elements. If you look at the link below, it shows that postItem is set to be a HorizontalDivider object if the list element isn't the last item.
Instead of including preItem and postItem as props, make it so that the list elements have horizontal dividers between them, in the same style as the Android app.
| flex: 1, | ||
| }, | ||
| listItem: { | ||
| borderBottomWidth: 1, |
There was a problem hiding this comment.
Use themes for colors; may also need to change this style sheet to ensure that the horizontal divider is shown correctly. The horizontal divider should ideally be at the bottom of every list item except the last one; you should be able to selectively set the style of the items in the list based on whether or not they are the last item in the list.
elysseaa
left a comment
There was a problem hiding this comment.
I generally agree with James' feedback - I think he got most of the issues down. I also had one minor question about the .gitignore file, but it's not as important.
Added a basic ItemList Component that copied the one in the Android app and left an example in the merchandise screen.