Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

755 B
Raw Blame
/**
 * The bar across the top of a canvas page, like PostHog Desktop's ChromeBar. It is as tall as the app
 * side panel's tab bar, so the two borders meet.
 */
export function CanvasToolbar({
    children,
    actions,
    dataAttr,
}: {
    children: React.ReactNode
    actions?: React.ReactNode
    dataAttr: string
}): JSX.Element {
    return (
        <div
            className="@container/canvas-toolbar flex h-12.5 shrink-0 items-center gap-2 border-b border-border bg-chrome pr-2 pl-1"
            data-attr={dataAttr}
        >
            <div className="flex min-w-0 flex-1 items-center gap-1 overflow-hidden">{children}</div>
            {actions && <div className="flex shrink-0 items-center gap-1">{actions}</div>}
        </div>
    )
}