add sideborders prop (#3920)

zio/stable
Samuel Newman 2024-05-08 21:44:49 +01:00 committed by GitHub
parent 750a5c899b
commit 701e508a1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -250,6 +250,7 @@ export function MessagesList() {
ListHeaderComponent={
<MaybeLoader isLoading={convo.isFetchingHistory} />
}
sideBorders={false}
/>
</ScrollProvider>
<MessageInput onSendMessage={onSendMessage} scrollToEnd={scrollToEnd} />

View File

@ -25,6 +25,7 @@ export type ListProps<ItemT> = Omit<
onRefresh?: () => void
onItemSeen?: (item: ItemT) => void
containWeb?: boolean
sideBorders?: boolean
}
export type ListRef = React.MutableRefObject<FlatList_INTERNAL | null>

View File

@ -23,6 +23,7 @@ export type ListProps<ItemT> = Omit<
onItemSeen?: (item: ItemT) => void
desktopFixedHeight: any // TODO: Better types.
containWeb?: boolean
sideBorders?: boolean
}
export type ListRef = React.MutableRefObject<any | null> // TODO: Better types.
@ -53,6 +54,7 @@ function ListImpl<ItemT>(
renderItem,
extraData,
style,
sideBorders = true,
...props
}: ListProps<ItemT>,
ref: React.Ref<ListMethods>,
@ -308,7 +310,7 @@ function ListImpl<ItemT>(
<View
ref={containerRef}
style={[
!isMobile && styles.sideBorders,
!isMobile && sideBorders && styles.sideBorders,
contentContainerStyle,
desktopFixedHeight ? styles.minHeightViewport : null,
pal.border,