27 lines
812 B
TypeScript
27 lines
812 B
TypeScript
import type { ReactNode } from "react";
|
|||
|
|
import { Link } from "react-router";
|
||
|
|
import logo from "../assets/logo.png";
|
||
|
|
|
||
|
|
interface TopBarProps {
|
||
|
|
/** Right-hand side: the signed-in user, role switcher and so on. */
|
||
|
|
children?: ReactNode;
|
||
|
|
}
|
||
|
|
|
||
|
|
/** Sticky shop header. Same markup classes as the old page's header.top. */
|
||
|
|
export function TopBar({ children }: TopBarProps) {
|
||
|
|
return (
|
||
|
|
<header className="top">
|
||
|
|
<div className="top-in">
|
||
|
|
<Link className="brand" to="/" aria-label="Packet Station home">
|
||
|
|
<img alt="PESCO" src={logo} width={119} height={34} />
|
||
|
|
<div className="nm">
|
||
|
|
Packet <span>Station</span>
|
||
|
|
</div>
|
||
|
|
</Link>
|
||
|
|
<div className="sp" />
|
||
|
|
{children ? <div className="who">{children}</div> : null}
|
||
|
|
</div>
|
||
|
|
</header>
|
||
|
|
);
|
||
|
|
}
|