mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 15:17:43 -05:00
39 lines
906 B
TypeScript
39 lines
906 B
TypeScript
/**
|
|
* The pill group every event card's meta row opens with (video timestamp,
|
|
* confidence, event type), kept tight so the detail text after reads as its own group.
|
|
*/
|
|
|
|
import { Clock, Gauge } from "lucide-react";
|
|
import { EventTypeIcon } from "./EventTypeIcon";
|
|
import { formatTime } from "./format";
|
|
import styles from "./MetaChips.module.css";
|
|
|
|
export function MetaPills({
|
|
t,
|
|
confidence,
|
|
type,
|
|
label,
|
|
}: {
|
|
t: number;
|
|
confidence: number;
|
|
type: string;
|
|
label: string;
|
|
}) {
|
|
return (
|
|
<div className={styles.pills}>
|
|
<span className={styles.chip} title="Video timestamp">
|
|
<Clock size={12} aria-hidden />
|
|
{formatTime(t)}
|
|
</span>
|
|
<span className={styles.chip} title="Detection confidence">
|
|
<Gauge size={12} aria-hidden />
|
|
{(confidence * 100).toFixed(0)}%
|
|
</span>
|
|
<span className={styles.chip}>
|
|
<EventTypeIcon type={type} />
|
|
{label}
|
|
</span>
|
|
</div>
|
|
);
|
|
}
|