import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "#/utils/utils"; const typographyVariants = cva("", { variants: { variant: { h1: "text-[32px] text-white font-medium leading-5", h2: "text-xl font-medium leading-6 -tracking-[0.02em] text-white", h3: "text-sm font-medium text-[var(--oh-text-tertiary)]", span: "text-sm font-normal text-white leading-5.5", p: "text-sm font-normal text-white leading-5.5", codeBlock: "font-mono text-sm leading-relaxed text-[var(--oh-text-tertiary)] whitespace-pre-wrap", }, }, defaultVariants: { variant: "h1", }, }); interface TypographyProps extends VariantProps { className?: string; testId?: string; children: React.ReactNode; } export function Typography({ variant, className, testId, children, }: TypographyProps) { const Tag = variant as keyof React.JSX.IntrinsicElements; return ( {children} ); } // Export individual heading components for convenience export function H1({ className, testId, children, }: Omit) { return ( {children} ); } export function H2({ className, testId, children, }: Omit) { return ( {children} ); } export function H3({ className, testId, children, }: Omit) { return ( {children} ); } export function Text({ className, testId, children, }: Omit) { return ( {children} ); } export function CodeBlock({ className, testId, children, }: Omit) { return ( {children} ); } export function Paragraph({ className, testId, children, }: Omit) { return ( {children} ); } // Attach components to Typography for the expected API Typography.H1 = H1; Typography.H2 = H2; Typography.H3 = H3; Typography.Text = Text; Typography.CodeBlock = CodeBlock; Typography.Paragraph = Paragraph;