2023-01-26 18:12:20 +00:00
|
|
|
// 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-05-20 12:00:15 +00:00
|
|
|
<div className="relative flex w-full flex-shrink-0 flex-row items-center justify-between gap-y-4 border-b border-brand-base bg-brand-sidebar px-5 py-4">
|
2023-05-05 11:37:29 +00:00
|
|
|
<div className="flex items-center gap-2">
|
2023-01-31 13:54:45 +00:00
|
|
|
<div className="block md:hidden">
|
2023-03-17 05:10:38 +00:00
|
|
|
<button
|
2023-01-31 13:54:45 +00:00
|
|
|
type="button"
|
2023-04-20 08:11:24 +00:00
|
|
|
className="grid h-8 w-8 place-items-center rounded border border-brand-base"
|
2023-01-31 13:54:45 +00:00
|
|
|
onClick={() => setToggleSidebar((prevData) => !prevData)}
|
|
|
|
>
|
|
|
|
<Bars3Icon className="h-5 w-5" />
|
2023-03-17 05:10:38 +00:00
|
|
|
</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;
|