src/components/subheading.tsximport React from 'react'import { clsx } from 'clsx'import type { HTMLAttributes } from 'react'import { generateIdFromChildren } from '@/tools/generate-id-from-children'type SubheadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div'interface SubheadingProps extends HTMLAttributes<HTMLHeadingElement> {children?: React.ReactNodeclassName?: string/** Custom ID for the subheading. If not provided, will be auto-generated from children content */id?: string/** The HTML tag to render (h1, h2, h3, h4, h5, h6, p, div) */as?: SubheadingLevel/** Font size override */fontSize?: string/** Font weight override */fontWeight?: string/** Letter spacing override */letterSpacing?: string
Showing the first 20 lines.
Get full code