The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type { ComponentPropsWithoutRef } from "react"; |
| 2 | |
| 3 | import { cn } from "../lib/utils"; |
| 4 | import { COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS } from "../workspaceTitlebar"; |
| 5 | |
| 6 | export function WorkspacePageHeader({ |
| 7 | electron = false, |
| 8 | reserveNativeControls = electron, |
| 9 | className, |
| 10 | ...props |
| 11 | }: ComponentPropsWithoutRef<"header"> & { |
| 12 | readonly electron?: boolean; |
| 13 | readonly reserveNativeControls?: boolean; |
| 14 | }) { |
| 15 | return ( |
| 16 | <header |
| 17 | className={cn( |
| 18 | "flex h-[var(--workspace-topbar-height)]! min-h-[var(--workspace-topbar-height)]! max-h-[var(--workspace-topbar-height)]! shrink-0 items-center gap-3 pl-(--workspace-gutter-start) pr-(--workspace-gutter-end) [[data-panel-animations=true]_&]:motion-safe:transition-[padding-left,padding-right] [[data-panel-animations=true]_&]:motion-safe:duration-(--panel-animation-duration) [[data-panel-animations=true]_&]:motion-safe:ease-out", |
| 19 | electron && "drag-region", |
| 20 | reserveNativeControls && "wco:pr-(--workspace-native-controls-inset)", |
| 21 | COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS, |
| 22 | className, |
| 23 | )} |
| 24 | {...props} |
| 25 | /> |
| 26 | ); |
| 27 | } |