UI: add back button to header

This commit is contained in:
Johannes Kirschbauer
2024-12-11 11:33:15 +01:00
parent f5fcb7b582
commit f3f4a7dfb1

View File

@@ -1,14 +1,17 @@
import { JSX } from "solid-js";
import { Typography } from "../components/Typography";
import { BackButton } from "../components/BackButton";
interface HeaderProps {
title: string;
toolbar?: JSX.Element;
showBack?: boolean;
}
export const Header = (props: HeaderProps) => {
return (
<div class="navbar border-b px-6 py-4 border-def-3">
<div class="flex-none">
{props.showBack && <BackButton />}
<span class="tooltip tooltip-bottom lg:hidden" data-tip="Menu">
<label
class="btn btn-square btn-ghost drawer-button"
@@ -19,7 +22,7 @@ export const Header = (props: HeaderProps) => {
</span>
</div>
<div class="flex-1">
<Typography hierarchy="title" size="m" weight="medium">
<Typography hierarchy="title" size="m" weight="medium" class="">
{props.title}
</Typography>
</div>