Files
mymoney/src/components/shared/PaymentBadge.tsx
2026-06-02 04:02:59 +02:00

21 lines
525 B
TypeScript

import { getPaymentVisualStyle } from "@/lib/finance/paymentVisualStyle";
import type { CalendarEventType, PaymentSourceType } from "@/types/finance";
export function PaymentBadge({
sourceType,
status,
children,
}: {
sourceType: PaymentSourceType | CalendarEventType | "income";
status?: string;
children: React.ReactNode;
}) {
return (
<span
className={`inline-flex rounded-full border px-2 py-1 text-xs ${getPaymentVisualStyle(sourceType, status).badge}`}
>
{children}
</span>
);
}