File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ const styles = StyleSheet.create({
145
145
- ` inactiveTintColor ` - label and icon color of the inactive label
146
146
- ` inactiveBackgroundColor ` - background color of the inactive label
147
147
- ` onItemPress(route) ` - function to be invoked when an item is pressed
148
+ - ` itemsContainerForceInset ` - override default forceInset on the SafeAreaView that wraps the items container component
148
149
- ` itemsContainerStyle ` - style object for the content section
149
150
- ` itemStyle ` - style object for the single item, which can contain an Icon and/or a Label
150
151
- ` labelStyle ` - style object to overwrite ` Text ` style inside content section, when your label is a string
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ type Props = {
26
26
getLabel : ( scene : DrawerScene ) => ?( React . Node | string ) ,
27
27
renderIcon : ( scene : DrawerScene ) => ?React . Node ,
28
28
onItemPress : ( info : DrawerItem ) => void ,
29
+ itemsContainerForceInset ? : Object ,
29
30
itemsContainerStyle ?: ViewStyleProp ,
30
31
itemStyle ?: ViewStyleProp ,
31
32
labelStyle ?: TextStyleProp ,
@@ -46,12 +47,13 @@ const DrawerNavigatorItems = ({
46
47
getLabel,
47
48
renderIcon,
48
49
onItemPress,
50
+ itemsContainerForceInset = { horizontal : 'never' , top : 'always' } ,
49
51
itemsContainerStyle,
50
52
itemStyle,
51
53
labelStyle,
52
54
iconContainerStyle,
53
55
} : Props ) => (
54
- < SafeAreaView forceInset = { { horizontal : 'never' , top : 'always' } } >
56
+ < SafeAreaView forceInset = { itemsContainerForceInset } >
55
57
< View style = { [ styles . container , itemsContainerStyle ] } >
56
58
{ items . map ( ( route : NavigationRoute , index : number ) => {
57
59
const focused = activeItemKey === route . key ;
You can’t perform that action at this time.
0 commit comments