Wolox / react-chat-widget

Awesome chat widget for your React App
MIT License
1.47k stars 457 forks source link

Using renderCustomComponent to render user messages #298

Open manthanbaranwal opened 2 years ago

manthanbaranwal commented 2 years ago

Hi there,

I have a requirement to show an image user upload. I believe I can have an external component for upload and I can use the image to show in conversation. I found renderCustomComponent method, which can render almost anything in chat box.

Now whenever I use this component it renders component as a message from bot end, i.e. the component renders on the left side. Is there any way renderCustomComponent can render component as message from user?

Here is how renderCustomComponent is rendering the image in chat box.

Screenshot 2022-02-04 at 2 39 38 PM

This is how I need it to render.

Screenshot 2022-02-04 at 2 35 45 PM
Wintjen commented 2 years ago

Did you ever find a solution for this?