mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
ede10fef9c
- Shared CountBadge component replacing heavy TOC accent circles - Per-file annotation count badges in FileBrowser and VaultBrowser - Folder aggregate counts from descendant files - Summary header showing total annotations across files - Dot indicators on Files/Vault sidebar tabs when annotations exist - Adaptive back button text (file list / file / message / plan) - Cross-file annotation indicator in right panel with flash highlight - Fix directory prefix matching bug (startsWith without trailing slash) - Move flash animation CSS to shared theme stylesheet For provenance purposes, this commit was AI assisted.
13 lines
508 B
TypeScript
13 lines
508 B
TypeScript
import React from "react";
|
|
|
|
/** Compact annotation count badge for sidebar file trees and TOC */
|
|
export const CountBadge: React.FC<{ count: number; active?: boolean; className?: string }> = ({ count, active, className }) => (
|
|
<span
|
|
className={`flex-shrink-0 min-w-[18px] h-[18px] px-1 rounded flex items-center justify-center text-[10px] font-mono leading-none ${
|
|
active ? 'text-primary bg-primary/15' : 'text-muted-foreground bg-muted/70'
|
|
} ${className ?? ''}`}
|
|
>
|
|
{count}
|
|
</span>
|
|
);
|