import type { ReactNode } from "react"; import { SKIN } from "../lib/skins"; import { SHOW_APP_TITLE } from "../lib/theme"; interface Props { title?: string; mascot?: string; /** Shown next to the title when the mouse is reachable but the firmware is not. */ status?: ReactNode; /** The phone size: a smaller mascot and title. */ compact?: boolean; } export function AppHeader({ title = SKIN.appName, mascot = SKIN.mascot, status, compact = false, }: Props) { if (!SHOW_APP_TITLE) { // Still clear the translucent standalone-mode status bar, and keep the status // pill - it is the only place an offline connection shows on these screens. return (
{status}
); } const mascotSize = compact ? 44 : 64; return (
{title}
{status}
); }