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.

1.1 KB
Raw Blame
/** A table of settings rows with the Setting / Project / Mine column header, and an optional title. */
export function SettingsTable({
    title,
    description,
    children,
}: {
    title?: string
    description?: string
    children: React.ReactNode
}): JSX.Element {
    return (
        <section className="@container overflow-hidden rounded border border-primary bg-surface-primary">
            {title && (
                <header className="flex flex-col gap-0.5 border-b border-primary px-4 py-3">
                    <h3 className="m-0 text-base font-semibold">{title}</h3>
                    {description && <p className="m-0 text-xs text-secondary">{description}</p>}
                </header>
            )}
            <div className="hidden grid-cols-[minmax(0,1fr)_minmax(0,14rem)_minmax(0,18rem)] gap-3 px-4 py-1.5 text-xxs font-semibold uppercase tracking-wide text-secondary @min-[48rem]:grid">
                <span>Setting</span>
                <span>Project default</span>
                <span>My preference</span>
            </div>
            {children}
        </section>
    )
}