mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
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>
60 lines
1.2 KiB
TypeScript
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>
|
|
);
|
|
}
|