2023-01-26 18:12:20 +00:00
|
|
|
// ui
|
|
|
|
import { Button } from "components/ui";
|
|
|
|
// icons
|
|
|
|
import { Bars3Icon } from "@heroicons/react/24/outline";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
breadcrumbs?: JSX.Element;
|
|
|
|
left?: JSX.Element;
|
|
|
|
right?: JSX.Element;
|
|
|
|
setToggleSidebar: React.Dispatch<React.SetStateAction<boolean>>;
|
|
|
|
};
|
|
|
|
|
2023-01-31 13:54:45 +00:00
|
|
|
const Header: React.FC<Props> = ({ breadcrumbs, left, right, setToggleSidebar }) => (
|
2023-02-17 14:28:27 +00:00
|
|
|
<div className="flex w-full flex-row items-center justify-between gap-y-4 border-b border-gray-200 bg-gray-50 px-5 py-4 ">
|
2023-01-31 13:54:45 +00:00
|
|
|
<div className="flex items-center gap-2">
|
|
|
|
<div className="block md:hidden">
|
|
|
|
<Button
|
|
|
|
type="button"
|
|
|
|
theme="secondary"
|
|
|
|
className="h-8 w-8"
|
|
|
|
onClick={() => setToggleSidebar((prevData) => !prevData)}
|
|
|
|
>
|
|
|
|
<Bars3Icon className="h-5 w-5" />
|
|
|
|
</Button>
|
2023-01-26 18:12:20 +00:00
|
|
|
</div>
|
2023-01-31 13:54:45 +00:00
|
|
|
{breadcrumbs}
|
|
|
|
{left}
|
|
|
|
</div>
|
|
|
|
{right}
|
|
|
|
</div>
|
|
|
|
);
|
2023-01-26 18:12:20 +00:00
|
|
|
|
|
|
|
export default Header;
|