UNPKG

@wordpress/components

Version:
8 lines (7 loc) 1.18 kB
{ "version": 3, "sources": ["../../src/heading/component.tsx"], "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useHeading } from './hook';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedHeading(props, forwardedRef) {\n const headerProps = useHeading(props);\n return /*#__PURE__*/_jsx(View, {\n ...headerProps,\n ref: forwardedRef\n });\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * ```jsx\n * import { __experimentalHeading as Heading } from \"@wordpress/components\";\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nexport const Heading = contextConnect(UnconnectedHeading, 'Heading');\nexport default Heading;"], "mappings": ";AAQA,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,YAAY;AAC5B,SAAS,mBAAmB,OAAO,cAAc;AAC/C,QAAM,cAAc,WAAW,KAAK;AACpC,SAAoB,qBAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH,KAAK;AAAA,EACP,CAAC;AACH;AAaO,IAAM,UAAU,eAAe,oBAAoB,SAAS;AACnE,IAAO,oBAAQ;", "names": [] }