import { createElement } from "react"; /** * External dependencies */ /** * Internal dependencies */ import { contextConnect } from '../context'; import { View } from '../view'; import { useHeading } from './hook'; function UnconnectedHeading(props, forwardedRef) { const headerProps = useHeading(props); return createElement(View, { ...headerProps, ref: forwardedRef }); } /** * `Heading` renders headings and titles using the library's typography system. * * ```jsx * import { __experimentalHeading as Heading } from "@wordpress/components"; * * function Example() { * return Code is Poetry; * } * ``` */ export const Heading = contextConnect(UnconnectedHeading, 'Heading'); export default Heading; //# sourceMappingURL=component.js.map