@wordpress/components
Version:
UI components for WordPress.
33 lines (32 loc) • 1.04 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let ___context_index_ts = require("../context/index.cjs");
let ___view_index_ts = require("../view/index.cjs");
let __hook_ts = require("./hook.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/components/src/heading/component.tsx
function UnconnectedHeading(props, forwardedRef) {
const headerProps = (0, __hook_ts.useHeading)(props);
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___view_index_ts.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 <Heading>Code is Poetry</Heading>;
* }
* ```
*/
const Heading = (0, ___context_index_ts.contextConnect)(UnconnectedHeading, "Heading");
exports.Heading = Heading;
exports.default = Heading;
//# sourceMappingURL=component.cjs.map