Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to customize drawer navigator in react native drawer?

$
0
0

I am creating a drawer navigation for my react native app but can't seem to customize the drawer. Tried following the documentation and other examples but they all bring up errors. I need to change the text size and colour and also add a profile picture on the top and a logout function way down at the bottom

function ProfileDrawer() {const Drawer = createDrawerNavigator()

return (<SafeAreaProvider><Drawer.Navigator            initialRouteName="DashBoard"            screenOptions={{                drawerStyle: {                    width: '60%',                },                drawerActiveTintColor: "#BC4B52",            }}><Drawer.Screen                name='DashBoard'                component={DashBoard}                options={{                    drawerType: 'front',                    title: "dashboard",                    headerShown: false,                }}            /><Drawer.Screen                name='Profile'                component={ProfileScreen}                options={{                    headerShown: false,                    drawerIcon: () =><Ionicons name="md-person-outline"                            size={30}                            color="black" />                }}            /><Drawer.Screen                name='Airtime'                component={AirtimeScreen}                options={{                    headerShown:false,                    drawerIcon:()=><Ionicons                    name="cash-outline"                    size={30}                    color="black"                />                }}            /></Drawer.Navigator></SafeAreaProvider>)

}


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>