Skip to content

Commit

Permalink
Merge pull request #557 from Ayushmaanagarwal1211/main
Browse files Browse the repository at this point in the history
Animation on chatbot #551
  • Loading branch information
panwar8279 authored May 30, 2024
2 parents 481f52c + e3a337a commit c7a7046
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
25 changes: 25 additions & 0 deletions frontend/src/ChatAssistant/ChatAssistant.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,32 @@
margin-right: 20px;
margin-bottom: 12px;
}
.chatbot-close-animation{
animation: animate-close ease-in 0.3s forwards;

}
.chatbot-animation{

animation: animate ease-in 0.3s forwards;
}
@keyframes animate {
from{
height: 0px;
/* width: 250px; */
}to{
height: 450px;
width: 350px;
}
}
@keyframes animate-close {
from{
height: 450px;
width: 350px;
}to{
height: 0px;
width: 0px;
}
}
.react-chatbot-kit-chat-input {
outline: none;
}
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ const ChatAssistant = () => {
return (
<div className="chatbot">
<img className="Logo" src={chatbotLogo} alt="Logo" onClick={toggleChatbot} />
{isOpen &&
<div className={`${isOpen?"chatbot-animation":"chatbot-close-animation"}`}>

{isOpen &&
<Chatbot
config={config}
messageParser={MessageParser}
actionProvider={ActionProvider}
/>}
/>

}
</div>
</div>
);
}
Expand Down

0 comments on commit c7a7046

Please sign in to comment.