@wordpress/components
Version:
UI components for WordPress.
40 lines (36 loc) • 990 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.Heading = void 0;
var _context = require("../context");
var _view = require("../view");
var _hook = require("./hook");
var _jsxRuntime = require("react/jsx-runtime");
/**
* External dependencies
*/
/**
* Internal dependencies
*/
function UnconnectedHeading(props, forwardedRef) {
const headerProps = (0, _hook.useHeading)(props);
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_view.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 = exports.Heading = (0, _context.contextConnect)(UnconnectedHeading, 'Heading');
var _default = exports.default = Heading;
//# sourceMappingURL=component.js.map