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.

787 B
Raw Blame
import { Fragment } from 'react'

import { ChartOptionGroup } from './ChartOptionGroup'
import type { DisplayOptionSection } from './displayOptions'

export function ChartOptionSections({ sections }: { sections: DisplayOptionSection[] }): JSX.Element {
    return (
        <>
            {sections.map((section) => {
                const items = section.items.map((item) => <Fragment key={item.name}>{item.element}</Fragment>)
                return section.title ? (
                    <ChartOptionGroup key={section.key} title={section.title} info={section.tooltip}>
                        {items}
                    </ChartOptionGroup>
                ) : (
                    <Fragment key={section.key}>{items}</Fragment>
                )
            })}
        </>
    )
}