【问题标题】:React-Navigation/drawer items bottom borderReact-Navigation/抽屉项目底部边框
【发布时间】:2021-03-28 20:39:54
【问题描述】:

我是 React native 的新手,我已经向我的应用程序添加了一个 react 导航抽屉菜单,但是如何为菜单项添加边框颜色? 我已经这样做了

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

【问题讨论】:

    标签: react-native navigation-drawer


    【解决方案1】:

    在抽屉导航器中修改itemStyle找到的解决方案

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-06-09
      • 1970-01-01
      • 2021-03-09
      • 2020-09-23
      • 2021-10-16
      • 1970-01-01
      • 1970-01-01
      • 2021-10-04
      相关资源
      最近更新 更多