Files
openmonetis/src/features/dashboard/components/invoices/invoice-logo.tsx
Felipe Coutinho 0514efb1c4 style(tipografia): adiciona fonte America Medium e padroniza pesos de texto
Adiciona os arquivos `america-medium.woff2` e `america-bold.woff2` e
registra o weight 500 no `font_index.ts`.

Padroniza o uso de `font-medium` em substituição a `font-semibold` e
`font-bold` em títulos, valores monetários e rótulos de destaque em
todos os componentes do app, landing page e componentes de UI base.

`Card` ganha `hover:border-primary/40` e `CardTitle` recebe `text-base`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 14:14:55 +00:00

60 lines
1.2 KiB
TypeScript

import Image from "next/image";
import {
buildInvoiceInitials,
type InvoiceLogoTone,
} from "@/features/dashboard/invoices-helpers";
import { resolveLogoSrc } from "@/shared/lib/logo";
import { cn } from "@/shared/utils/ui";
type InvoiceLogoProps = {
cardName: string;
logo: string | null;
size: number;
containerClassName?: string;
imageClassName?: string;
fallbackClassName?: string;
tone?: InvoiceLogoTone;
};
export function InvoiceLogo({
cardName,
logo,
size,
containerClassName,
imageClassName,
fallbackClassName,
tone = "muted",
}: InvoiceLogoProps) {
const resolvedLogo = resolveLogoSrc(logo);
return (
<div
className={cn(
"flex shrink-0 items-center justify-center overflow-hidden rounded-full",
tone === "accent" && "bg-primary/10",
containerClassName,
)}
>
{resolvedLogo ? (
<Image
src={resolvedLogo}
alt={`Logo do cartão ${cardName}`}
width={size}
height={size}
className={cn("h-full w-full object-contain", imageClassName)}
/>
) : (
<span
className={cn(
"text-sm font-medium uppercase text-muted-foreground",
tone === "accent" && "text-primary",
fallbackClassName,
)}
>
{buildInvoiceInitials(cardName)}
</span>
)}
</div>
);
}