From 5d89f66de125a61f79dd7c1eb43d7d884bdc3b4f Mon Sep 17 00:00:00 2001 From: Sailaja Adapa Date: Tue, 11 Jun 2024 14:02:44 +0530 Subject: [PATCH 1/2] Added Hover Effect --- frontend/src/style/Rateus.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/style/Rateus.css b/frontend/src/style/Rateus.css index d0c1a511..23b53e80 100644 --- a/frontend/src/style/Rateus.css +++ b/frontend/src/style/Rateus.css @@ -11,6 +11,12 @@ border: 1px solid #210202; border-radius: 5px; background-color: black; + transition: transform 0.3s, box-shadow 0.3s; /* Add box-shadow to transition */ +} + +.rate-us-container:hover { + transform: scale(1.05); /* Increase the size on hover */ + box-shadow: 0 0 10px 5px #7c1de2; /* Add a lighting effect */ } .rate-us-heading { From e48a1721196b3bb295760deb454f92fd15a3ea10 Mon Sep 17 00:00:00 2001 From: Sailaja Adapa Date: Tue, 11 Jun 2024 14:20:57 +0530 Subject: [PATCH 2/2] Added Toastify Messages --- frontend/src/Component/Rateus.js | 62 +++++++++++++++++++------------- frontend/src/style/Rateus.css | 6 ---- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/frontend/src/Component/Rateus.js b/frontend/src/Component/Rateus.js index 4f46ce08..1e1c861d 100644 --- a/frontend/src/Component/Rateus.js +++ b/frontend/src/Component/Rateus.js @@ -1,4 +1,6 @@ import React, { useState } from "react"; +import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; import "./../style/Rateus.css"; function RateUsComponent({ previousContent }) { @@ -19,35 +21,47 @@ function RateUsComponent({ previousContent }) { // Reset the state after submitting setRating(0); setFeedback(""); - } + // Show toast message + toast.success("Thanks For Your Feedback :)", { + position: "top-center" + }); + } else { + toast.error("Please Enter All Details :(", { + position: "top-center" + }); + } }; return ( -
-
-

Rate Our Website

-
- {[1, 2, 3, 4, 5].map((star) => ( - handleStarClick(star)} - > - ★ - - ))} + <> +
+
+

Rate Our Website

+
+ {[1, 2, 3, 4, 5].map((star) => ( + handleStarClick(star)} + > + ★ + + ))} +
+ +
- -
-
+ + ); } + export default RateUsComponent; diff --git a/frontend/src/style/Rateus.css b/frontend/src/style/Rateus.css index 23b53e80..d0c1a511 100644 --- a/frontend/src/style/Rateus.css +++ b/frontend/src/style/Rateus.css @@ -11,12 +11,6 @@ border: 1px solid #210202; border-radius: 5px; background-color: black; - transition: transform 0.3s, box-shadow 0.3s; /* Add box-shadow to transition */ -} - -.rate-us-container:hover { - transform: scale(1.05); /* Increase the size on hover */ - box-shadow: 0 0 10px 5px #7c1de2; /* Add a lighting effect */ } .rate-us-heading {