UNPKG

@gechiui/components

Version:
38 lines (33 loc) 895 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * Internal dependencies */ import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useHeading } from './hook'; function Heading(props, forwardedRef) { const headerProps = useHeading(props); return createElement(View, _extends({}, headerProps, { ref: forwardedRef })); } /** * `Heading` renders headings and titles using the library's typography system. * * @example * ```jsx * import { Heading } from `@gechiui/components` * * function Example() { * return <Heading>Code is Poetry</Heading>; * } * ``` */ const ConnectedHeading = contextConnect(Heading, 'Heading'); export default ConnectedHeading; //# sourceMappingURL=component.js.map