CubeSugar/react-native-waveview

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

ZMChoo opened this issue · 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?

@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.