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>
42 lines
812 B
TypeScript
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>
|
|
);
|
|
}
|