From 269f77f76d5fbfd25d4f89b689f2315b6d766a0a Mon Sep 17 00:00:00 2001 From: ashutosh4036 Date: Wed, 5 Jan 2022 19:07:09 +0530 Subject: [PATCH] Sidebar --- src/lib-components/sidebar/Navigation.css | 72 +++++++++++++++++++++++ src/lib-components/sidebar/Navigation.js | 46 +++++++++++++++ src/lib-components/sidebar/Sidebar.js | 43 ++++++++++++++ 3 files changed, 161 insertions(+) create mode 100644 src/lib-components/sidebar/Navigation.css create mode 100644 src/lib-components/sidebar/Navigation.js create mode 100644 src/lib-components/sidebar/Sidebar.js diff --git a/src/lib-components/sidebar/Navigation.css b/src/lib-components/sidebar/Navigation.css new file mode 100644 index 0000000..e821f3b --- /dev/null +++ b/src/lib-components/sidebar/Navigation.css @@ -0,0 +1,72 @@ +.navbar { + background-color: #060b26; + height: 80px; + display: flex; + justify-content: flex-start; + align-items: center; + } + + .menu-bars { + margin-left: 2rem; + font-size: 2rem; + background: none; + } + + .nav-menu { + background-color: #060b26; + width: 250px; + height: 100vh; + display: flex; + justify-content: center; + position: fixed; + top: 0; + left: -100%; + transition: 850ms; + } + + .nav-menu.active { + left: 0; + transition: 350ms; + } + + .nav-text { + display: flex; + justify-content: flex-start; + align-items: center; + padding: 8px 0px 8px 16px; + list-style: none; + height: 60px; + } + + .nav-text a { + text-decoration: none; + color: #f5f5f5; + font-size: 18px; + width: 95%; + height: 100%; + display: flex; + align-items: center; + padding: 0 16px; + border-radius: 4px; + } + + .nav-text a:hover { + background-color: #1a83ff; + } + + .nav-menu-items { + width: 100%; + } + + .navbar-toggle { + background-color: #060b26; + width: 100%; + height: 80px; + display: flex; + justify-content: flex-start; + align-items: center; + } + + span { + margin-left: 16px; + } \ No newline at end of file diff --git a/src/lib-components/sidebar/Navigation.js b/src/lib-components/sidebar/Navigation.js new file mode 100644 index 0000000..e8c4849 --- /dev/null +++ b/src/lib-components/sidebar/Navigation.js @@ -0,0 +1,46 @@ +import React, { useState } from 'react'; +import * as FaIcons from 'react-icons/fa'; +import * as AiIcons from 'react-icons/ai'; +import { Link } from 'react-router-dom'; +import { Sidebar} from './Sidebar'; +import './Navigation.css'; +import { IconContext } from 'react-icons'; + +function Navbar() { + const [sidebar, setSidebar] = useState(false); + + const showSidebar = () => setSidebar(!sidebar); + + return ( + <> + +
+ + + +
+ +
+ + ); +} + +export default Navbar; \ No newline at end of file diff --git a/src/lib-components/sidebar/Sidebar.js b/src/lib-components/sidebar/Sidebar.js new file mode 100644 index 0000000..99be8d9 --- /dev/null +++ b/src/lib-components/sidebar/Sidebar.js @@ -0,0 +1,43 @@ +import React from 'react'; +import * as FaIcons from 'react-icons/fa'; +import * as AiIcons from 'react-icons/ai'; +import * as IoIcons from 'react-icons/io'; + +export const Sidebar = [ + { + title: 'Home', + path: '/', + icon: , + cName: 'nav-text' + }, + { + title: 'Reports', + path: '/reports', + icon: , + cName: 'nav-text' + }, + { + title: 'Products', + path: '/products', + icon: , + cName: 'nav-text' + }, + { + title: 'Team', + path: '/team', + icon: , + cName: 'nav-text' + }, + { + title: 'Messages', + path: '/messages', + icon: , + cName: 'nav-text' + }, + { + title: 'Login', + path: '/login', + icon: , + cName: 'nav-text' + } +]; \ No newline at end of file