Ank*_*raj 3 reactjs react-native
正如代码中给出的那样,我已经尝试过,我想知道抽屉中显示的“主页”是否会偶然变为白色?
<Drawer.Section style={{backgroundColor:"green"}}>
<DrawerItem
icon={({ color, size }) => (
<Icon name="home-outline" color={"white"} size={size}/>
)}
label="Home"
color="white" //as this is not working
onPress={() => {
props.navigation.navigate("Home");
}}
/>
</Drawer.Section>
Run Code Online (Sandbox Code Playgroud)
没有颜色属性,您可以使用以下道具来设置 DrawerItem 的样式
activeTintColor:项目处于活动状态时图标和标签的颜色。inactiveTintColor:当项目处于非活动状态时图标和标签的颜色。activeBackgroundColor:项目处于活动状态时的背景颜色。inactiveBackgroundColor:项目处于非活动状态时的背景颜色。labelStyle:标签文本的样式对象。style:包装视图的样式对象。| 归档时间: |
|
| 查看次数: |
1049 次 |
| 最近记录: |