feat: primitives (Wordmark, Container, CTA) with tests

This commit is contained in:
erikgh committed 2026-07-21 10:10:14 -06:00
1 parent 48a37395aa
commit 7d12e35600
9 files changed
+98 -2

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
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>
);
}