React Native Gallio Framework 导航栏
React Native Galio Framework navbar
我正在使用 React-Native,Galio 框架。
在导航栏中我有一些图标,我想放大它们...这可能吗?
import { Button, Block, NavBar, Input, Text, theme } from 'galio-framework';
<NavBar
back={back}
title={title}
style={styles.navbar}
transparent={transparent}
right={this.renderRight()}
rightStyle={{ alignItems: 'center' }}
leftStyle={{ paddingTop: 3, flex: 0.3 }}
leftIconName={back ? 'chevron-circle-left' : 'navicon'}
leftIconFamily="font-awesome"
leftIconColor={
white ? materialTheme.COLORS.NAVICON : theme.COLORS.ICON
}
titleStyle={[
styles.title,
{ color: theme.COLORS[white ? 'WHITE' : 'ICON'] },
]}
onLeftPress={this.handleLeftPress}
/>
我希望 chevron-circle-left 和 navicon 稍微大一点..
任何道具都不可能做到这一点,因为如果您检查 renderleft 的代码,图标大小是使用主题大小
计算的
<Icon
family={leftIconFamily || "evilicons"}
color={leftIconColor || theme.COLORS.ICON}
size={theme.SIZES.BASE * 1.0625}
name={leftIconName || (back ? 'chevron-left' : 'navicon')}
/>
但是您可以使用变通方法,因为您已经手动提供了这些道具,您可以将其作为 'left' 道具提供,您可以自定义尺寸,这将帮助您渲染自己的左侧。
我正在使用 React-Native,Galio 框架。
在导航栏中我有一些图标,我想放大它们...这可能吗?
import { Button, Block, NavBar, Input, Text, theme } from 'galio-framework';
<NavBar
back={back}
title={title}
style={styles.navbar}
transparent={transparent}
right={this.renderRight()}
rightStyle={{ alignItems: 'center' }}
leftStyle={{ paddingTop: 3, flex: 0.3 }}
leftIconName={back ? 'chevron-circle-left' : 'navicon'}
leftIconFamily="font-awesome"
leftIconColor={
white ? materialTheme.COLORS.NAVICON : theme.COLORS.ICON
}
titleStyle={[
styles.title,
{ color: theme.COLORS[white ? 'WHITE' : 'ICON'] },
]}
onLeftPress={this.handleLeftPress}
/>
我希望 chevron-circle-left 和 navicon 稍微大一点..
任何道具都不可能做到这一点,因为如果您检查 renderleft 的代码,图标大小是使用主题大小
计算的 <Icon
family={leftIconFamily || "evilicons"}
color={leftIconColor || theme.COLORS.ICON}
size={theme.SIZES.BASE * 1.0625}
name={leftIconName || (back ? 'chevron-left' : 'navicon')}
/>
但是您可以使用变通方法,因为您已经手动提供了这些道具,您可以将其作为 'left' 道具提供,您可以自定义尺寸,这将帮助您渲染自己的左侧。