FredrikOseberg / react-chatbot-kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add text above the bot and user message

cmendoza-dev opened this issue · comments

In the documentation I can't find how to customize the messages from the bot or the user.

` customComponents: {
header: (props) => <ChatbotHeader {...props} />,
botAvatar: (props) => <BotAvatar {...props} />,
userAvatar: (props) => <UserAvatar {...props} />,

//customize the messages from the bot
botMessages: CustomBotMessage,

},
**CustomBotMessage.js**import React from 'react';

const CustomBotMessage = ({ message }) => {
return (



Tec
{message.timestamp && (
{new Date(message.timestamp).toLocaleString()}
)}

{message.message}


);
};

export default CustomBotMessage;

Captura de pantalla 2024-02-19 223306

@FredrikOseberg Please help me!

`