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.

648 B
Raw Blame
type MarkdownEditorCharacterCountFooterProps = {
    currentLength: number
    maxLength: number
}

export function MarkdownEditorCharacterCountFooter({
    currentLength,
    maxLength,
}: MarkdownEditorCharacterCountFooterProps): JSX.Element {
    const isAtCharacterLimit = currentLength > maxLength

    return (
        <div
            className={`px-3 py-1 border-t bg-surface-primary text-xs text-right shrink-0 ${
                isAtCharacterLimit ? 'text-danger' : 'text-muted'
            }`}
        >
            {currentLength}/{maxLength} characters
            {isAtCharacterLimit ? ' (limit reached)' : ''}
        </div>
    )
}