@wordpress/block-library
Version:
Block library for the WordPress editor.
33 lines (31 loc) • 666 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { RichText, useBlockProps } from '@wordpress/block-editor';
export default function save(_ref) {
let {
attributes
} = _ref;
const {
align,
content,
dropCap,
direction
} = attributes;
const className = classnames({
'has-drop-cap': dropCap,
[`has-text-align-${align}`]: align
});
return createElement("p", useBlockProps.save({
className,
dir: direction
}), createElement(RichText.Content, {
value: content
}));
}
//# sourceMappingURL=save.js.map