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.

921 B
Raw Blame
import clsx from 'clsx'

interface IconWindowProps {
    value: number | string
    size?: 'small' | 'medium'
    className?: string
}

export function IconWindow({ value, className = '', size = 'medium' }: IconWindowProps): JSX.Element {
    const shortValue = typeof value === 'number' ? value : String(value).charAt(0)

    return (
        <div
            className={clsx(
                'flex justify-center items-center shrink-0 bg-muted-alt text-white rounded',
                size === 'medium' && 'w-5 h-5',
                size === 'small' && 'w-4 h-4',
                className
            )}
        >
            <span
                className={clsx(
                    'font-bold select-none',
                    size === 'medium' && 'text-xs',
                    size === 'small' && 'text-xxs'
                )}
            >
                {shortValue}
            </span>
        </div>
    )
}