From 4e4d7281eb014b137adcabfdcab1565f46cf7f03 Mon Sep 17 00:00:00 2001 From: Aarush Saboo <160993404+aarushsaboo@users.noreply.github.com> Date: Mon, 21 Oct 2024 00:59:48 +0530 Subject: [PATCH] Added a chatbot help button that is responsive and will be used to display the chatbot when clicked on. --- client/src/components/ChatbotHelp.css | 30 +++++++++++++++++++++++++++ client/src/components/ChatbotHelp.jsx | 23 ++++++++++++++++++++ client/src/pages/Home.jsx | 2 ++ 3 files changed, 55 insertions(+) create mode 100644 client/src/components/ChatbotHelp.css create mode 100644 client/src/components/ChatbotHelp.jsx diff --git a/client/src/components/ChatbotHelp.css b/client/src/components/ChatbotHelp.css new file mode 100644 index 0000000..d8f6f82 --- /dev/null +++ b/client/src/components/ChatbotHelp.css @@ -0,0 +1,30 @@ +.chatbotHelpContainer { + position: fixed; + display: flex; + bottom: 10px; /* Adjust this to where you want the element */ + right: 20px; /* Adjust this to where you want the element */ + z-index: 1000; /* Ensures it stays on top of other elements */ +} + +.chatbotHelpContainer svg:nth-of-type(2){ + transform: translateX(58px); + z-index: 888; + transition: fill 0.3s ease, filter 0.3s ease; +} + +.chatbotHelpContainer svg:nth-of-type(2) circle{ + filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.3)); + cursor: pointer; + +} +.chatbotHelpContainer svg:nth-of-type(2) circle:hover{ + fill: black; +} +.chatbotHelpContainer svg:nth-of-type(1):hover ~ svg:nth-of-type(2) circle{ + fill: black; +} +.chatbotHelpContainer svg:nth-of-type(1){ + transform: translate(175px, 85px); + z-index: 889; + cursor: pointer; +} \ No newline at end of file diff --git a/client/src/components/ChatbotHelp.jsx b/client/src/components/ChatbotHelp.jsx new file mode 100644 index 0000000..3628298 --- /dev/null +++ b/client/src/components/ChatbotHelp.jsx @@ -0,0 +1,23 @@ +import React from "react"; +import "./ChatbotHelp.css"; + +const ChatbotHelp = () => { + return ( +