我在图标中设置了宽度和高度。该图标被隐藏,并且在增加其高度和宽度时也会在标签中反映出来。
我需要增加图像的宽度和高度,而不需要增加标签的宽度和高度。
我正在使用 react-native-paper 包
<FAB.Group
color="white"
fabStyle={this.state.open ? {borderWidth: 1, borderColor: 'white', shadowOpacity: 0} : {shadowOpacity: 0}}
theme={this.state.open ? {colors: {accent: 'transparent'}} : undefined}
style={{paddingBottom: 100, paddingRight: SCREEN_WIDTH/2 - 45}}
open={this.state.open}
icon={this.state.open ? 'close' : 'plus'}
actions={[
{
icon: (props) => <Image source={{uri: image}} style = {{width:50, height:50, tintColor:'white'}} {...props} />,
label: 'NEW',
onPress: onNew,
style: {backgroundColor:'transparent'}
},
{
icon: (props) => <Image source={{uri: IMage}} style = {{width:50, height:50, tintColor:'white'}} {...props} />,
label: 'NEW',
onPress: New,
style: {backgroundColor:'transparent'}
},
]}
onStateChange={({ open }) => this.setState({ open })}
onPress={() => {
if (this.state.open) {
// do something if the speed dial is open
}
}}
{...this.props}
/>