2026-07-08 16:29:41 +05:30

12 lines
435 B
TypeScript

import { TrendingDown, TrendingUp } from "lucide-react";
export function Delta({ value, good = true }: { value: string; good?: boolean }) {
const Icon = good ? TrendingUp : TrendingDown;
return (
<span className={`inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-bold ${good ? "bg-mint/12 text-forest dark:text-mint" : "bg-coral/12 text-coral"}`}>
<Icon size={13} />
{value}
</span>
);
}