/** @jsx jsx */ import * as React from "react" import { jsx, Theme, ThemeUICSSObject } from "theme-ui" import useSpecimensConfig from "../hooks/useSpecimensConfig" import Badge from "./badge" import getValue from "../utils/get-value" import themeConfig from "../theme" type HeadingProps = { styles?: Theme["styles"] config: Theme previewText?: string } const infoStyles: ThemeUICSSObject = { display: `flex`, flexDirection: `column`, alignItems: `flex-start`, } const Heading = ({ styles = undefined, config, previewText = `Heading` }: HeadingProps) => { const specimensConfig = useSpecimensConfig() if (!styles) { return
{`{`}
fontSize:
{` `}
{type.size}
, fontWeight
:
{` `}
"{type.weight}"
, lineHeight
:
{` `}
"{type.lineHeight}"
, fontFamily
:
{` `}
"{type.fontFamily}"
{` `}
{`}`}