Files
Creeer-Web/components/primitives/Wordmark.tsx
T

24 lines
785 B
TypeScript

import { wordmark } from '@/lib/content';
type Size = 'sm' | 'md' | 'lg' | 'xl';
const sizeClass: Record<Size, string> = {
sm: 'text-xl',
md: 'text-2xl',
lg: 'text-3xl',
xl: 'text-5xl',
};
export function Wordmark({ size = 'lg', onDark = false }: { size?: Size; onDark?: boolean }) {
const { before, accent, after, dot } = wordmark.parts;
const baseColor = onDark ? 'text-cream' : 'text-ink';
const goldColor = onDark ? 'text-gold-bright' : 'text-gold';
return (
<span className={`font-serif italic font-bold tracking-tight leading-none ${sizeClass[size]} ${baseColor}`}>
{before}
<span data-accent="true" className={`not-italic font-black ${goldColor}`}>{accent}</span>
{after}
<span className={goldColor}>{dot}</span>
</span>
);
}