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.

623 B
Raw Blame
import { ReactNode } from 'react'

import { cn } from 'lib/utils/css-classes'

export interface TableCellProps {
    width: number
    align?: 'right'
    children: ReactNode
}

/** Body cell of a tracing virtualized table. Width comes from `useResizableColumns`. */
export function TableCell({ width, align, children }: TableCellProps): JSX.Element {
    return (
        <div
            className={cn('shrink-0 truncate px-2 text-xs', align === 'right' && 'text-right')}
            // eslint-disable-next-line react/forbid-dom-props
            style={{ width }}
        >
            {children}
        </div>
    )
}