@wordpress/block-library
Version:
Block library for the WordPress editor.
30 lines (28 loc) • 707 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* External dependencies
*/
import classNames from 'classnames';
/**
* WordPress dependencies
*/
import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';
export default function save(_ref) {
let {
attributes
} = _ref;
const {
align,
citation
} = attributes;
const className = classNames({
[`has-text-align-${align}`]: align
});
return createElement("blockquote", useBlockProps.save({
className
}), createElement(InnerBlocks.Content, null), !RichText.isEmpty(citation) && createElement(RichText.Content, {
tagName: "cite",
value: citation
}));
}
//# sourceMappingURL=save.js.map