Files
openmonetis/src/shared/components/entity-avatar/establishment-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

42 lines
812 B
TypeScript

import {
buildInitials,
getCategoryBgColorFromName,
getCategoryColorFromName,
} from "@/shared/utils/category-colors";
import { cn } from "@/shared/utils/ui";
interface EstablishmentLogoProps {
name: string;
size?: number;
className?: string;
}
export function EstablishmentLogo({
name,
size = 32,
className,
}: EstablishmentLogoProps) {
const initials = buildInitials(name);
const color = getCategoryColorFromName(name);
const bgColor = getCategoryBgColorFromName(name);
return (
<div
className={cn(
"flex shrink-0 items-center justify-center rounded-full font-medium",
className,
)}
style={{
width: size,
height: size,
fontSize: Math.max(10, Math.round(size * 0.38)),
backgroundColor: bgColor,
color,
}}
aria-hidden
>
{initials}
</div>
);
}