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.

833 B
Raw Blame
import { IconInfo } from '@posthog/icons'
import { FieldLabel, Tooltip, TooltipContent, TooltipTrigger } from '@posthog/quill'

export interface QuillChartOptionLabelProps {
    htmlFor: string
    label: string
    info?: string
}

export function QuillChartOptionLabel({ htmlFor, label, info }: QuillChartOptionLabelProps): JSX.Element {
    return (
        <FieldLabel htmlFor={htmlFor} className="items-center gap-1 font-normal">
            {label}
            {info && (
                <Tooltip>
                    <TooltipTrigger render={<span className="inline-flex text-muted-foreground" />}>
                        <IconInfo />
                    </TooltipTrigger>
                    <TooltipContent className="max-w-64">{info}</TooltipContent>
                </Tooltip>
            )}
        </FieldLabel>
    )
}