From 99c5aa411302ea2a3054927da1dec82c4672868e Mon Sep 17 00:00:00 2001 From: vishal kumar Date: Fri, 3 May 2024 17:39:49 +0530 Subject: [PATCH] Truncate history button (#50) --- src/components/ChatHistoryButton/ChatHistoryButton.css | 8 ++++++++ src/components/ChatHistoryButton/ChatHistoryButton.tsx | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/ChatHistoryButton/ChatHistoryButton.css b/src/components/ChatHistoryButton/ChatHistoryButton.css index c31fc6a8..f702501e 100644 --- a/src/components/ChatHistoryButton/ChatHistoryButton.css +++ b/src/components/ChatHistoryButton/ChatHistoryButton.css @@ -24,6 +24,14 @@ border-color: #adadad; border-width: 0.5px; border-style: solid; + max-width: 60%; cursor: pointer; transition: color 0.3s ease, border-color 0.3s ease; +} + +.rcb-view-history-button > p{ + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } \ No newline at end of file diff --git a/src/components/ChatHistoryButton/ChatHistoryButton.tsx b/src/components/ChatHistoryButton/ChatHistoryButton.tsx index aa96b69f..bc622457 100644 --- a/src/components/ChatHistoryButton/ChatHistoryButton.tsx +++ b/src/components/ChatHistoryButton/ChatHistoryButton.tsx @@ -57,7 +57,9 @@ const ChatHistoryButton = ({ }} className="rcb-view-history-button" > - {botOptions.chatHistory?.viewChatHistoryButtonText} +

+ {botOptions.chatHistory?.viewChatHistoryButtonText} +

);