"use client";
import { cn } from "@/lib/utils";
import { Badge } from "@kandev/ui/badge";
type CommitStatBadgeProps = {
label: string;
tone: "ahead" | "behind";
className?: string;
};
type LineStatProps = {
added?: number;
removed?: number;
className?: string;
};
const commitTone = {
ahead: "text-emerald-500 border-emerald-500/40",
behind: "text-yellow-500 border-yellow-500/40",
};
const lineTone = {
add: "text-emerald-600",
remove: "text-rose-600",
};
export function CommitStatBadge({ label, tone, className }: CommitStatBadgeProps) {
return (
{label}
);
}
export function LineStat({ added, removed, className }: LineStatProps) {
return (
{typeof added === "number" && +{added}}
{typeof removed === "number" && -{removed}}
);
}