File tree Expand file tree Collapse file tree 13 files changed +4
-62
lines changed
packages/react-native-bottom-tabs Expand file tree Collapse file tree 13 files changed +4
-62
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ import NativeBottomTabsUnmounting from './Examples/NativeBottomTabsUnmounting';
3131import NativeBottomTabsCustomTabBar from './Examples/NativeBottomTabsCustomTabBar' ;
3232import NativeBottomTabsFreezeOnBlur from './Examples/NativeBottomTabsFreezeOnBlur' ;
3333
34- const FourTabsIgnoreSafeArea = ( ) => {
35- return < FourTabs ignoresTopSafeArea /> ;
36- } ;
37-
3834const HiddenTab = ( ) => {
3935 return < FourTabs hideOneTab /> ;
4036} ;
@@ -89,12 +85,6 @@ const examples = [
8985 name : 'Embedded stacks' ,
9086 screenOptions : { headerShown : false } ,
9187 } ,
92- {
93- component : FourTabsIgnoreSafeArea ,
94- name : 'Four Tabs - No header' ,
95- platform : 'ios' ,
96- screenOptions : { headerShown : false } ,
97- } ,
9888 {
9989 component : FourTabsRippleColor ,
10090 name : 'Four Tabs with ripple Color' ,
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { Chat } from '../Screens/Chat';
77import type { ColorValue } from 'react-native' ;
88
99interface Props {
10- ignoresTopSafeArea ?: boolean ;
1110 disablePageAnimations ?: boolean ;
1211 scrollEdgeAppearance ?: 'default' | 'opaque' | 'transparent' ;
1312 backgroundColor ?: ColorValue ;
@@ -18,7 +17,6 @@ interface Props {
1817}
1918
2019export default function FourTabs ( {
21- ignoresTopSafeArea = false ,
2220 disablePageAnimations = false ,
2321 scrollEdgeAppearance = 'default' ,
2422 backgroundColor,
@@ -64,7 +62,6 @@ export default function FourTabs({
6462
6563 return (
6664 < TabView
67- ignoresTopSafeArea = { ignoresTopSafeArea }
6865 sidebarAdaptable
6966 disablePageAnimations = { disablePageAnimations }
7067 scrollEdgeAppearance = { scrollEdgeAppearance }
Original file line number Diff line number Diff line change @@ -118,11 +118,6 @@ A tab bar style that adapts to each platform:
118118- macOS/tvOS: Sidebar
119119- visionOS: Ornament with sidebar for secondary tabs
120120
121- #### ` ignoresTopSafeArea ` <Badge text =" iOS " type =" info " />
122-
123- Whether to ignore the top safe area.
124- - Type: ` boolean `
125-
126121#### ` disablePageAnimations ` <Badge text =" iOS " type =" info " />
127122
128123Whether to disable animations between tabs.
Original file line number Diff line number Diff line change @@ -73,10 +73,6 @@ Optional unique ID for the navigator. This can be used with `navigation.getParen
7373
7474The name of the route to render on first load of the navigator.
7575
76- #### ` ignoresTopSafeArea ` <Badge text = " iOS" type = " info" />
77-
78- Whether to ignore the top safe area. Defaults to ` true ` .
79-
8076#### ` screenOptions `
8177
8278Default options to use for the screens in the navigator.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const Tabs = createNativeBottomTabNavigator();
2121
2222function NativeBottomTabs() {
2323 return (
24- <Tabs.Navigator ignoresTopSafeArea >
24+ <Tabs.Navigator >
2525 <Tabs.Screen
2626 name = " Home"
2727 component = { HomeScreen }
Original file line number Diff line number Diff line change @@ -137,10 +137,6 @@ class RCTTabViewManager(context: ReactApplicationContext) : ViewGroupManager<Rea
137137 fun setSidebarAdaptable (view : ReactBottomNavigationView , flag : Boolean ) {
138138 }
139139
140- @ReactProp(name = " ignoresTopSafeArea" )
141- fun setIgnoresTopSafeArea (view : ReactBottomNavigationView , flag : Boolean ) {
142- }
143-
144140 @ReactProp(name = " hapticFeedbackEnabled" )
145141 fun setHapticFeedbackEnabled (view : ReactBottomNavigationView , value : Boolean ) {
146142 tabViewImpl.setHapticFeedbackEnabled(view, value)
Original file line number Diff line number Diff line change @@ -119,10 +119,6 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
119119 _tabViewProvider.labeled = newViewProps.labeled ;
120120 }
121121
122- if (oldViewProps.ignoresTopSafeArea != newViewProps.ignoresTopSafeArea ) {
123- _tabViewProvider.ignoresTopSafeArea = newViewProps.ignoresTopSafeArea ;
124- }
125-
126122 if (oldViewProps.selectedPage != newViewProps.selectedPage ) {
127123 _tabViewProvider.selectedPage = RCTNSStringFromString (newViewProps.selectedPage );
128124 }
@@ -162,7 +158,7 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
162158 if (oldViewProps.fontFamily != newViewProps.fontFamily ) {
163159 _tabViewProvider.fontFamily = RCTNSStringFromStringNilIfEmpty (newViewProps.fontFamily );
164160 }
165-
161+
166162 if (oldViewProps.tabBarHidden != newViewProps.tabBarHidden ) {
167163 _tabViewProvider.tabBarHidden = newViewProps.tabBarHidden ;
168164 }
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ @implementation RCTTabView
3232RCT_EXPORT_VIEW_PROPERTY(icons, NSArray <RCTImageSource *>);
3333RCT_EXPORT_VIEW_PROPERTY (sidebarAdaptable, BOOL )
3434RCT_EXPORT_VIEW_PROPERTY(labeled, BOOL )
35- RCT_EXPORT_VIEW_PROPERTY(ignoresTopSafeArea, BOOL )
3635RCT_EXPORT_VIEW_PROPERTY(disablePageAnimations, BOOL )
3736RCT_EXPORT_VIEW_PROPERTY(scrollEdgeAppearance, NSString )
3837RCT_EXPORT_VIEW_PROPERTY(translucent, BOOL )
Original file line number Diff line number Diff line change @@ -86,9 +86,7 @@ struct TabViewImpl: View {
8686 let icon = props. icons [ index]
8787
8888 RepresentableView ( view: child)
89- . ignoresTopSafeArea (
90- props. ignoresTopSafeArea
91- )
89+ . ignoresSafeArea ( . all, edges: . all)
9290 . tabItem {
9391 TabItem (
9492 title: tabData? . title,
@@ -290,19 +288,6 @@ extension View {
290288 }
291289 }
292290
293- @ViewBuilder
294- func ignoresTopSafeArea(
295- _ flag: Bool
296- ) -> some View {
297- if flag {
298- self
299- . ignoresSafeArea ( . container, edges: . all)
300- } else {
301- self
302- . ignoresSafeArea ( . container, edges: . bottom)
303- }
304- }
305-
306291#if !os(macOS)
307292 @ViewBuilder
308293 func configureAppearance( props: TabViewProps , tabBar: UITabBar ? ) -> some View {
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ class TabViewProps: ObservableObject {
1515 @Published var activeTintColor : PlatformColor ?
1616 @Published var inactiveTintColor : PlatformColor ?
1717 @Published var translucent : Bool = true
18- @Published var ignoresTopSafeArea : Bool = true
1918 @Published var disablePageAnimations : Bool = false
2019 @Published var hapticFeedbackEnabled : Bool = false
2120 @Published var fontSize : Int ?
You can’t perform that action at this time.
0 commit comments