From da49d1e2d363cff1d322fe341d5a1850abcf83ec Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Wed, 5 Nov 2025 14:25:38 +0100 Subject: [PATCH] Make top insets optional --- src/components/SharedComponents/ViewWrapper.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/SharedComponents/ViewWrapper.tsx b/src/components/SharedComponents/ViewWrapper.tsx index a2b48ddcc..812d75a61 100644 --- a/src/components/SharedComponents/ViewWrapper.tsx +++ b/src/components/SharedComponents/ViewWrapper.tsx @@ -12,13 +12,15 @@ interface Props extends PropsWithChildren { // If someone can explain to me why className doesn't work here, I'm all // ears ~~~kueda 20230815 wrapperClassName?: string; + useTopInset?: boolean; } const ViewWrapper = ( { children, isDebug, wrapperClassName, - testID + testID, + useTopInset = true }: Props ) => { const insets = useSafeAreaInsets(); return ( @@ -31,8 +33,11 @@ const ViewWrapper = ( { ? "border-2 border-deepPink" : null )} + // eslint-disable-next-line react-native/no-inline-styles style={{ - paddingTop: insets.top + paddingTop: useTopInset + ? insets.top + : 0 }} testID={testID} >