Search code examples
react-nativenavigation-drawer

React-Navigation/drawer items bottom border


I'm new to React native ,I have add a react navigation drawer menu to my app,but how add a border color to menu items ? I have already do this

options={{
             drawerLabel: 'Page title',
             drawerIcon: () => (
              <View
                style={
               {
                        borderLeftColor: 'red',
                        borderLeftWidth: 2,
                        paddingLeft: 5,
                      }                  
                }>            
              </View>
            ),
            
            }}

Solution

  • solution found by modify itemStyle in the Drawer Navigator

    <Drawer.Navigator
        drawerContentOptions={{
          activeTintColor: '#D09900',
          itemStyle: { borderRadius:0,marginVertical: 0,borderBottomWidth:0.5,borderBottomColor:'#D09900' },
        }}>