import { forwardRef } from 'react'; import type { HTMLAttributes, ReactNode } from 'react'; export interface HeadingProps extends Omit, 'className'> { /** 1 = page title (30px), 2 = section (24px), 3 = card title (16px). */ level?: 1 | 2 | 3; /** Visual size — defaults to the level, so existing call sites keep their look. */ size?: 1 | 2 | 3; children: ReactNode; className?: string; } export const Heading = forwardRef(function Heading( { level = 2, size, className, children, ...rest }, ref, ) { const Tag = `h${level}` as 'h1' | 'h2' | 'h3'; return ( {children} ); });