@wordpress/block-library
Version:
Block library for the WordPress editor.
39 lines (36 loc) • 1.02 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = save;
var _clsx = _interopRequireDefault(require("clsx"));
var _blockEditor = require("@wordpress/block-editor");
var _jsxRuntime = require("react/jsx-runtime");
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
function save({
attributes
}) {
const {
textAlign,
citation
} = attributes;
const className = (0, _clsx.default)({
[`has-text-align-${textAlign}`]: textAlign
});
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("blockquote", {
..._blockEditor.useBlockProps.save({
className
}),
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.InnerBlocks.Content, {}), !_blockEditor.RichText.isEmpty(citation) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, {
tagName: "cite",
value: citation
})]
});
}
//# sourceMappingURL=save.js.map
;