How to make react native rounded button background to transparent or remove white from the background?

68 views Asked by At

enter image description here

I use react native elements button to create the buttons. The button style is applied from theme. Button style is

      Button: (props,theme)=>({
        loading: false,
        raised: true,
        color: theme.colors.primary,
        buttonStyle: { borderRadius: 20, elevation: 0, overflow: 'hidden'},  
        containerStyle:{     
          backgroundColor: theme.colors.tertiary,
          overflow: 'hidden',
          marginHorizontal: 20,
          marginVertical: 10,},
        titleStyle: {
            color: theme.colors.tertiary,
        }
      }),

how to remove the white around the corners?

1

There are 1 answers

1
Bala Vigness On

Change the backgroundColor prop of the containerStyle to transparent

containerStyle: {
    backgroundColor: 'transparent',
      },