UI: add back button to header
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user