From 80c5f23da274adb9270a024e7f0e84e09b8f575e Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 29 Oct 2024 14:32:10 +0200 Subject: Fix double padding in `Dialog.InnerFlatList` on web (#5986) * remove extra padding on web * pass prop --- src/components/Dialog/index.tsx | 5 ++++- src/components/Dialog/index.web.tsx | 21 +++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) (limited to 'src/components/Dialog') diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index 8b43a85e4..c860c4dcf 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -267,7 +267,10 @@ export const ScrollableInner = React.forwardRef( export const InnerFlatList = React.forwardRef< ListMethods, - ListProps & {webInnerStyle?: StyleProp} + ListProps & { + webInnerStyle?: StyleProp + webInnerContentContainerStyle?: StyleProp + } >(function InnerFlatList({style, ...props}, ref) { const insets = useSafeAreaInsets() const {nativeSnapPoint, disableDrag, setDisableDrag} = useDialogContext() diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx index 43cb95b03..41a39ffda 100644 --- a/src/components/Dialog/index.web.tsx +++ b/src/components/Dialog/index.web.tsx @@ -210,21 +210,26 @@ export const ScrollableInner = Inner export const InnerFlatList = React.forwardRef< FlatList, - FlatListProps & {label: string} & {webInnerStyle?: StyleProp} ->(function InnerFlatList({label, style, webInnerStyle, ...props}, ref) { + FlatListProps & {label: string} & { + webInnerStyle?: StyleProp + webInnerContentContainerStyle?: StyleProp + } +>(function InnerFlatList( + {label, style, webInnerStyle, webInnerContentContainerStyle, ...props}, + ref, +) { const {gtMobile} = useBreakpoints() return ( + ]} + contentContainerStyle={[a.px_0, webInnerContentContainerStyle]}>