Skip to content

Commit

Permalink
Merge pull request #558 from Amruta7203/new
Browse files Browse the repository at this point in the history
Hover effect for ChatBot logo on opening and closing
  • Loading branch information
panwar8279 authored May 30, 2024
2 parents c7a7046 + 1638036 commit 3eff368
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/ChatAssistant/ChatAssistant.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@
height: 45px;
}

.Logo{
cursor: pointer;
height:50px;
width:50px;

.Logo {
height: 50px;
width: 50px;

border-radius: 50px;
right: 12px;
}
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/ChatAssistant/ChatAssistant.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ActionProvider from '../ChatBot/ActionProvider';
import "./ChatAssistant.css"
import React, { useState } from 'react';
import chatbotLogo from '../assets/chatbotLogo.jpeg'
import chatbotLogo1 from '../assets/logo1.png'

const ChatAssistant = () => {
const [isOpen, setIsOpen] = useState(false);
Expand All @@ -15,6 +16,12 @@ const ChatAssistant = () => {
};
return (
<div className="chatbot">
<img className="Logo" src={chatbotLogo} alt="Logo" onClick={toggleChatbot}
onMouseEnter={() => (document.querySelector(".Logo").src = chatbotLogo1)}
onMouseLeave={() => (document.querySelector(".Logo").src = chatbotLogo)}
/>
{isOpen &&

<img className="Logo" src={chatbotLogo} alt="Logo" onClick={toggleChatbot} />
<div className={`${isOpen?"chatbot-animation":"chatbot-close-animation"}`}>

Expand Down
Binary file added frontend/src/assets/logo1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3eff368

Please sign in to comment.