0

I have set width and height in the Icon. The icon get hidden and the same will reflecting in the label as increasing its height and width.

I need to increase the width and height for the Image and not need to increase the width and height of the label.

I am using react-native-paper package

  <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}
            />
sejn
  • 2,040
  • 6
  • 28
  • 82

1 Answers1

0

I totally avoid issues like this and use the React native UI kit. https://akveo.github.io/react-native-ui-kitten/