diff --git a/client/package-lock.json b/client/package-lock.json index 53f8ea7..c3f3fdf 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8,6 +8,9 @@ "name": "vite-project", "version": "0.0.0", "dependencies": { + "@fortawesome/fontawesome-free": "^5.15.3", + "@popperjs/core": "^2.11.8", + "font-awesome": "^4.7.0", "framer-motion": "^10.16.4", "react": "^18.2.0", "react-dom": "^18.2.0", @@ -471,6 +474,15 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@fortawesome/fontawesome-free": { + "version": "5.15.3", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz", + "integrity": "sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==", + "hasInstallScript": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.11", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", @@ -587,6 +599,15 @@ "node": ">= 8" } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@remix-run/router": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.9.0.tgz", @@ -1917,6 +1938,14 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, + "node_modules/font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha512-U6kGnykA/6bFmg1M/oT9EkFeIYv7JlX3bozwQJWiiLz6L0w3F5vBVPxHlwyX/vtNq1ckcpRKOB9f2Qal/VtFpg==", + "engines": { + "node": ">=0.10.3" + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", diff --git a/client/package.json b/client/package.json index 99d656d..a836c83 100644 --- a/client/package.json +++ b/client/package.json @@ -10,6 +10,9 @@ "preview": "vite preview" }, "dependencies": { + "@fortawesome/fontawesome-free": "^5.15.3", + "@popperjs/core": "^2.11.8", + "font-awesome": "^4.7.0", "framer-motion": "^10.16.4", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/client/src/App.css b/client/src/App.css index 46963ee..e69de29 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -1,3 +0,0 @@ -body { - background-image: linear-gradient(90deg, #cdffd8, #94b9ff); - } \ No newline at end of file diff --git a/client/src/assets/Img11.png b/client/src/assets/Img11.png deleted file mode 100644 index 4d0b171..0000000 Binary files a/client/src/assets/Img11.png and /dev/null differ diff --git a/client/src/assets/User.jpg b/client/src/assets/User.jpg deleted file mode 100644 index 177e8df..0000000 Binary files a/client/src/assets/User.jpg and /dev/null differ diff --git a/client/src/assets/pattern_react.png b/client/src/assets/pattern_react.png new file mode 100644 index 0000000..cb2d897 Binary files /dev/null and b/client/src/assets/pattern_react.png differ diff --git a/client/src/components/Dropdown.jsx b/client/src/components/Dropdown.jsx new file mode 100644 index 0000000..a10cd7a --- /dev/null +++ b/client/src/components/Dropdown.jsx @@ -0,0 +1,109 @@ +import React from "react"; +import { Link } from "react-router-dom"; +import { createPopper } from "@popperjs/core"; + +const Dropdown = () => { + // dropdown props + const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false); + const btnDropdownRef = React.createRef(); + const popoverDropdownRef = React.createRef(); + const openDropdownPopover = () => { + createPopper(btnDropdownRef.current, popoverDropdownRef.current, { + placement: "bottom-start", + }); + setDropdownPopoverShow(true); + }; + const closeDropdownPopover = () => { + setDropdownPopoverShow(false); + }; + return ( + <> + { + e.preventDefault(); + dropdownPopoverShow ? closeDropdownPopover() : openDropdownPopover(); + }} + > + Pages + +