From ffdef22670be628c8e0d4de208b028fee6ae6f93 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Tue, 12 Jul 2022 16:14:08 +0500 Subject: [PATCH] animation + footer-nav merge --- src/App.tsx | 11 +++++++++-- src/components/global/Footer.tsx | 14 +++++++++++--- src/components/global/Nav.tsx | 19 ++++++++++--------- src/icons/arrow-down-black.svg | 4 ++-- src/styles/_footer.scss | 4 +++- src/styles/_nav.scss | 9 +++++++++ src/styles/_nullifier.scss | 1 + src/types/dropdown.ts | 4 ++++ 8 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 src/types/dropdown.ts diff --git a/src/App.tsx b/src/App.tsx index bad76d1..2e95fe7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ // Modules import { Routes, Route } from "react-router-dom"; +import { useState } from "react"; // Styles import "./styles/style.scss"; @@ -19,9 +20,15 @@ import Contacts from "./pages/Contact"; import Calendar from "./components/global/Calendar"; const App = () => { + // Types + type drop = [boolean, React.Dispatch>]; + + // State + const [dropdown, setDropdown]: drop = useState(false); + return (
-
); }; diff --git a/src/components/global/Footer.tsx b/src/components/global/Footer.tsx index 7f76658..cf7f101 100644 --- a/src/components/global/Footer.tsx +++ b/src/components/global/Footer.tsx @@ -10,15 +10,23 @@ import linkedin from "../../icons/linkedin.svg"; import instagram from "../../icons/instagram.svg"; import facebook from "../../icons/facebook.svg"; -const Footer = () => { +// Types +import { dropdown } from "../../types/dropdown"; + +const Footer = ({ dropdown, setDropdown }: dropdown) => { return (