Skip to content

Commit

Permalink
added icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Fisico committed Mar 8, 2024
1 parent 514224b commit b891c17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/containers/MenuItem.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import { FaAngleDown, FaAngleUp } from "react-icons/fa";

const MenuItem = ({ label, icon, onClick, isActive, children, link }) => {
const [isOpen, setIsOpen] = useState(false);
Expand All @@ -23,6 +24,7 @@ const MenuItem = ({ label, icon, onClick, isActive, children, link }) => {
<div className='menuEntry'>
{icon}
<p>{label}</p>
<div className='submenuIcon'>{children && (isOpen ? <FaAngleUp /> : <FaAngleDown />)} </div>
</div>
<div className='submenu'>
{isOpen && children}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/TheSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TheSidebar = ({ showSidebar, setShowSidebar, isMobile }) => {
{ label: 'Phillips', icon: <Bridge style={{ color: "#FCEE86" }} />, link: '#hue' },
]
},

{ label: 'Logout', icon: <FaSignOutAlt style={{ color: "#E0E043" }} />, link: 'logout' },
];

return (
Expand Down
5 changes: 5 additions & 0 deletions src/scss/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
padding: 20px 7px;
color: #eee;
font-size: 18px;


.submenuIcon{
margin-left: auto;
}
}

.submenu{
Expand Down

0 comments on commit b891c17

Please sign in to comment.