feat: toggle left menubar

This commit is contained in:
Anoop M D
2022-03-14 03:08:57 +05:30
parent 92692c766a
commit 0030a1b8d8
6 changed files with 67 additions and 24 deletions

View File

@ -1,9 +1,19 @@
import React from 'react';
import Link from 'next/link';
import { IconCode, IconStack, IconGitPullRequest, IconUser, IconUsers, IconSettings,IconBuilding } from '@tabler/icons';
import { IconCode, IconStack, IconGitPullRequest, IconUser, IconUsers, IconSettings, IconBuilding, IconChevronsLeft} from '@tabler/icons';
import actions from 'providers/Store/actions';
import { useStore } from 'providers/Store';
import StyledWrapper from './StyledWrapper';
const MenuBar = () => {
const [store, storeDispatch] = useStore();
const hideMenuBar = () => {
storeDispatch({
type: actions.TOGGLE_LEFT_MENUBAR
})
};
return (
<StyledWrapper className="h-full flex flex-col">
<div className="flex flex-col">
@ -35,6 +45,9 @@ const MenuBar = () => {
<div className="menu-item">
<IconSettings size={28} strokeWidth={1.5}/>
</div>
<div className="menu-item" onClick={hideMenuBar}>
<IconChevronsLeft size={28} strokeWidth={1.5}/>
</div>
</div>
</StyledWrapper>
);