| 1 | import { ArrowLeftIcon } from "@heroicons/react/24/outline"; |
| 2 | |
| 3 | export interface PageHeaderProps { |
| 4 | onTitleClick?: () => void; |
| 5 | title?: string; |
| 6 | showBorder?: boolean; |
| 7 | } |
| 8 | |
| 9 | export function PageHeader({ |
| 10 | onTitleClick, |
| 11 | title, |
| 12 | showBorder = true, |
| 13 | }: PageHeaderProps) { |
| 14 | return ( |
| 15 | <div |
| 16 | className={`border-command-border sticky top-0 z-20 m-0 flex items-center justify-between border border-x-0 ${showBorder ? "border-b" : "border-b-0"} border-t-0 border-solid bg-inherit py-3.5`} |
| 17 | > |
| 18 | <div |
| 19 | className="flex cursor-pointer items-center transition-colors duration-200 hover:brightness-125" |
| 20 | onClick={onTitleClick} |
| 21 | > |
| 22 | <ArrowLeftIcon className="ml-3 inline-block h-3 w-3" /> |
| 23 | {title && <span className="mx-2 inline-block font-bold">{title}</span>} |
| 24 | </div> |
| 25 | </div> |
| 26 | ); |
| 27 | } |