Lift fixed footers above the absolutely positioned tab bar
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ee6a408a1a
commit
473f9d7415
@@ -77,7 +77,9 @@ export const ScreenShell = ({
|
|||||||
// Bottom spacing: if inside tab navigator, add TAB_BAR_HEIGHT + breathing room
|
// Bottom spacing: if inside tab navigator, add TAB_BAR_HEIGHT + breathing room
|
||||||
// If there's a fixedFooter, we don't necessarily need tab bar padding on the scroll view,
|
// If there's a fixedFooter, we don't necessarily need tab bar padding on the scroll view,
|
||||||
// but let's leave it for safety or adjust based on layout.
|
// but let's leave it for safety or adjust based on layout.
|
||||||
const tabBarPadding = withTabBar ? TAB_BAR_HEIGHT + 16 : 20;
|
// A fixed footer already clears the tab bar (see below), so the scroll above
|
||||||
|
// it only needs breathing room, not the bar's full height again.
|
||||||
|
const tabBarPadding = withTabBar && !fixedFooter ? TAB_BAR_HEIGHT + 16 : 20;
|
||||||
|
|
||||||
const scrollContent = (
|
const scrollContent = (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
@@ -149,7 +151,15 @@ export const ScreenShell = ({
|
|||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{innerContent}
|
{innerContent}
|
||||||
{fixedFooter}
|
{/* The tab bar is absolutely positioned over the bottom of the frame,
|
||||||
|
so a footer laid out in flow would sit underneath it — the Pay and
|
||||||
|
Continue buttons were rendering behind the bar. Lifting it by the
|
||||||
|
bar's height keeps it above. */}
|
||||||
|
{fixedFooter ? (
|
||||||
|
<View style={withTabBar ? { paddingBottom: TAB_BAR_HEIGHT } : undefined}>
|
||||||
|
{fixedFooter}
|
||||||
|
</View>
|
||||||
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user