React-native-gifted-chat: how can change the color of the message box

Created on 16 Nov 2017  路  7Comments  路  Source: FaridSafi/react-native-gifted-chat

I need to change the color of the message box from blue to orange

question

Most helpful comment

  renderBubble (props) {
    return (
      <Bubble
        {...props}
        wrapperStyle={{
          right: {
            backgroundColor: Colors.primary
          }
        }}
      />
    )
  }

<GiftedChat
  ...
  renderBubble={this.renderBubble}

All 7 comments

  renderBubble (props) {
    return (
      <Bubble
        {...props}
        wrapperStyle={{
          right: {
            backgroundColor: Colors.primary
          }
        }}
      />
    )
  }

<GiftedChat
  ...
  renderBubble={this.renderBubble}

I close this issue but create a FAQ in readme to refer it: https://github.com/FaridSafi/react-native-gifted-chat#questions

I see what you're doing but where does that Bubble component come from and how do you import it?

It's just the normal bubble from gifted-chat, but we just override the default styles

import { Bubble } from 'react-native-gifted-chat'

And if i wanna change the text color on bubble ?

renderBubble (props) {
      return (
        <Bubble
          {...props}
          textStyle={{
            right: {
              color: "white"
            },
            left: {
              color: "white"
            }
          }}
        />
      )
    }

Can anyone tell me how can I change the shape of the message box
like this
image

Was this page helpful?
0 / 5 - 0 ratings