Skip to content

Commit 27af9bd

Browse files
fix(Tabs): remove width/height 100% from TabsHost fillParent style
The fillParent style on TabsHost uses `flex: 1` together with `width: '100%'` and `height: '100%'`. The explicit width/height prevents TabsHost from participating in flex layout with sibling views, because '100%' forces it to take the full parent size regardless of other flex children. This makes it impossible to place persistent UI elements (e.g. a banner ad) alongside NativeTabs in a parent flex container — the tabs always cover the full screen. Removing width/height and keeping only `flex: 1` lets the native component fill the remaining space after siblings, while the native iOS (NSLayoutConstraint pinning) and Android (MATCH_PARENT) layout still correctly sizes the tab controller within TabsHost bounds.
1 parent 3d45292 commit 27af9bd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/components/tabs/TabsHost.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,5 @@ export default TabsHost;
9999
const styles = StyleSheet.create({
100100
fillParent: {
101101
flex: 1,
102-
width: '100%',
103-
height: '100%',
104102
},
105103
});

0 commit comments

Comments
 (0)