Added: sidebar open-close

This commit is contained in:
Llewellyn D'souza
2022-01-07 17:13:16 +05:30
parent 74c8f033ba
commit 5c54936ac1
7 changed files with 78 additions and 16 deletions

View File

@@ -1,8 +1,18 @@
import React from 'react'
import styles from './topbar.module.css'
import React from 'react';
import HamburgerIcon from '../../assets/icons/Hamburger-icon';
import styles from './topbar.module.css';
export default function TopBar() {
export default function TopBar({ isMobileScreen, isSidebarOpen, setSidebarOpen }) {
return (
<div className={styles.topBar}>search comes here</div>
)
<div className={styles.topBar}>
<div
onClick={() => {
setSidebarOpen(true);
}}
>
{isSidebarOpen ? null : <HamburgerIcon color="#000" />}
</div>
<div>Other icons here</div>
</div>
);
}