import { forwardRef } from 'react'; import type { HTMLAttributes, ReactNode } from 'react'; export interface HeadingProps extends Omit, 'className'> { /** 1 = 44px, 2 = 40px section heading, 3 = 30px sub-head. */ 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} ); });