bkioshn
bkioshn

Reputation: 51

How to make carousel message in GiftedChat React Native

Here is what I want to do

Message Carousel example

I can make a message with buttons, but I don't know how to combine components in order to create a carousel.

Upvotes: 0

Views: 285

Answers (1)

bkioshn
bkioshn

Reputation: 51

I just found a solution. Basically you just need to modify your renderBubble. I passed some props to tell that the message received is a carousel.

I used ScrollView for my outer container and View for each block.

<ScrollView  style={{
     backgroundColor:'white', 
     height: 200, 
}} horizontal={true}> 
    <View> <View/>
</ScrollView>

and for normal text just return Bubble

<Bubble {...props} />

Upvotes: 1

Related Questions