forked from github/plane
4c2cb2368a
* chore: store various shades of accent color * refactor: custom theme selector * refactor: custom theme selector * chore: update custom theme input labels * fix: color generator function logic * fix: accent color preloaded data * chore: new theming structure * chore: update shades calculation logic * refactor: variable names * chore: update color scheming * chore: new color scheming * refactor: themes folder structure * chore: update classnames to the new ones * chore: update static colors * chore: sidebar link colors * chore: placeholder color * chore: update border classnames
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
// 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>>;
|
|
noHeader: boolean;
|
|
};
|
|
|
|
const Header: React.FC<Props> = ({ breadcrumbs, left, right, setToggleSidebar, noHeader }) => (
|
|
<div
|
|
className={`relative flex w-full flex-shrink-0 flex-row z-10 items-center justify-between gap-y-4 border-b border-custom-border-100 bg-custom-sidebar-background-100 px-5 py-4 ${
|
|
noHeader ? "md:hidden" : ""
|
|
}`}
|
|
>
|
|
<div className="flex items-center gap-2">
|
|
<div className="block md:hidden">
|
|
<button
|
|
type="button"
|
|
className="grid h-8 w-8 place-items-center rounded border border-custom-border-100"
|
|
onClick={() => setToggleSidebar((prevData) => !prevData)}
|
|
>
|
|
<Bars3Icon className="h-5 w-5" />
|
|
</button>
|
|
</div>
|
|
{breadcrumbs}
|
|
{left}
|
|
</div>
|
|
{right}
|
|
</div>
|
|
);
|
|
|
|
export default Header;
|