/** @jsxRuntime classic */ /** @jsx jsx */ import { jsx } from '../emotion' import { forwardRefWithAs } from '../utils' import { useTheme } from '../theme' import { Box, type BoxProps } from './Box' export const HeadingTypes = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const type HeadingType = (typeof HeadingTypes)[number] type HeadingProps = { /** The type of heading. */ type?: HeadingType } & BoxProps export const Heading = forwardRefWithAs<'h1', HeadingProps>( ({ as = 'h1', type = 'h1', ...props }, ref) => { const { headingStyles } = useTheme() const headingStyle = headingStyles[type] const styles = { color: headingStyle.color, fontFamily: headingStyle.family, fontSize: headingStyle.size, fontWeight: headingStyle.weight, textTransform: headingStyle.transform, margin: 0, } as const return } ) export const H1 = forwardRefWithAs<'h1', BoxProps>(({ as = 'h1', ...props }, ref) => { return }) export const H2 = forwardRefWithAs<'h2', BoxProps>(({ as = 'h2', ...props }, ref) => { return }) export const H3 = forwardRefWithAs<'h3', BoxProps>(({ as = 'h3', ...props }, ref) => { return }) export const H4 = forwardRefWithAs<'h4', BoxProps>(({ as = 'h4', ...props }, ref) => { return }) export const H5 = forwardRefWithAs<'h5', BoxProps>(({ as = 'h5', ...props }, ref) => { return }) export const H6 = forwardRefWithAs<'h6', BoxProps>(({ as = 'h6', ...props }, ref) => { return })