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.

611 B
Raw Blame
import type { ReactElement, ReactNode } from 'react'

interface ChartHeaderProps {
    title: string
    /** Right-aligned controls (chart-type select, options, …). Omit for visualizations with none. */
    children?: ReactNode
}

export function ChartHeader({ title, children }: ChartHeaderProps): ReactElement {
    return (
        <div className="mb-2 flex items-center gap-2">
            <div className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">{title}</div>
            {children && <div className="ml-auto flex items-center gap-2">{children}</div>}
        </div>
    )
}