react-native-waveview icon indicating copy to clipboard operation
react-native-waveview copied to clipboard

How to add a label in the middle of the wave?

Open ZMChoo opened this issue 6 years ago • 1 comments

Hi there, I'm new to react native, what I want to do in my project is I would like to make the button with a background of water wave, is there any suggestion to make it? Or is there any way to add a label in the middle of the water wave?

ZMChoo avatar Dec 13 '18 02:12 ZMChoo

@mun5865 Sorry for the late reply.

You can try to warp Wave Component with a parent View, like below:

<TouchableHighlight
    onPress={}
>
    <View style={{/* your own styles*/}}>
        <Wave style={{position: 'absolute', ...otherStyles}} ...otherProps />
        <Text style={{/* your label styles*/}}>{"SOME_TEXT"}</Text>
    </View>
</TouchableHighlight>

hope it's helpful to you.

CubeSugar avatar Feb 14 '19 02:02 CubeSugar