Skip to content

Commit 552b368

Browse files
authored
Merge pull request #365 from StubberG3/balancer/359/chat-animation
feat: #359 - Add animation to chat button
2 parents 9c403dd + 68f65d4 commit 552b368

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

frontend/src/components/Header/Chat.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,9 @@ const Chat: React.FC<ChatDropDownProps> = ({ showChat, setShowChat }) => {
475475
) : (
476476
<div
477477
onClick={() => setShowChat(true)}
478-
className="fixed bottom-9 left-10 h-16 w-16 inline-block cursor-pointer flex items-center justify-center rounded-full bg-blue-500 object-contain hover:cursor-pointer hover:bg-blue-300 md:bottom-20 md:right-20 no-print"
478+
className="chat_button no-print"
479479
>
480-
<FaComments className="text-white h-10 w-10" />
481-
<div className="absolute bottom-20 mt-2 hidden w-32 rounded bg-gray-700 px-2 py-1 text-sm text-white before:absolute before:-top-2 before:left-1/2 before:-translate-x-1/2 before:transform before:border-8 before:border-transparent before:border-b-gray-700 group-hover:block">
482-
Any questions? Click here to to chat!
483-
</div>
480+
<FaComments className="relative text-white w-10 h-10 z-10" />
484481
</div>
485482
)}
486483
</>

frontend/src/components/Header/chat.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
.chat_button {
2+
@apply fixed bottom-9 left-10 h-16 w-16 cursor-pointer rounded-full bg-blue-500 hover:cursor-pointer hover:bg-blue-300 md:bottom-20 md:right-20 flex items-center justify-center animate-pulse-bounce;
3+
}
4+
5+
.chat_button_animations {
6+
@apply flex justify-center items-center;
7+
}
8+
19
.inside_chat {
210
@apply grow px-2 py-2 bg-neutral-100 overflow-y-auto overflow-x-hidden;
311
}
@@ -87,4 +95,15 @@ ul.chat_suggestion_list {
8795

8896
.scroll_down {
8997
@apply z-40 absolute bottom-[90px] left-[45%] text-3xl text-gray-400 hover:text-blue-500 rounded-full border-2 border-white bg-white;
98+
}
99+
100+
@keyframes pulse-bounce {
101+
0%, 100% {
102+
opacity: 1;
103+
transform: translateY(0);
104+
}
105+
50% {
106+
opacity: .5;
107+
transform: translateY(-25%);
108+
}
90109
}

frontend/tailwind.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ export default {
1010
lora: "'Lora', serif",
1111
'quicksand': ['Quicksand', 'sans-serif']
1212
},
13+
animation: {
14+
'pulse-bounce': 'pulse-bounce 2s infinite', // Adjust duration and iteration as needed
15+
},
16+
plugins: [],
1317
},
1418
},
1519
plugins: [],

0 commit comments

Comments
 (0)