Files
memos/web/src/components/IdentityLabel.tsx
T
johnnyjoygh e051129f1d chore(brand): adopt SVG bird logo across app and README
Share logo and identity typography across navigation, auth, and About
while preserving custom branding.

Use a transparent blue favicon and Celadon installation icons with
refreshed cache versions.
2026-10-16 09:23:19 +08:00

33 lines
996 B
TypeScript

import type { ReactNode } from "react";
import { cn } from "@/lib/utils";
const TEXT_SCALE = { sm: "text-base", md: "text-lg", lg: "text-2xl", hero: "text-[2rem]" } as const;
interface Props {
mark: ReactNode;
label: string;
size?: keyof typeof TEXT_SCALE;
collapsed?: boolean;
wrap?: boolean;
className?: string;
}
/** Shared mark and name typography for navigation and page branding. */
const IdentityLabel = ({ mark, label, size = "md", collapsed, wrap, className }: Props) => (
<span
className={cn("flex min-w-0 items-center text-foreground", size === "hero" ? "gap-3" : size === "lg" ? "gap-2.5" : "gap-2", className)}
>
{mark}
{!collapsed && (
<span
className={cn("min-w-0", wrap ? "wrap-anywhere" : "truncate", TEXT_SCALE[size], "font-normal leading-[1.25] tracking-[-0.025em]")}
style={{ fontFamily: 'Georgia, "Times New Roman", Times, serif' }}
>
{label}
</span>
)}
</span>
);
export default IdentityLabel;