@wordpress/block-library
Version:
Block library for the WordPress editor.
31 lines (28 loc) • 851 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* External dependencies
*/
import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
export default function save(_ref) {
var _style$typography;
let {
attributes,
className
} = _ref;
const {
fontSize,
style
} = attributes;
const blockProps = useBlockProps.save({
className: classnames(className, {
'has-custom-font-size': fontSize || (style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontSize)
})
});
const innerBlocksProps = useInnerBlocksProps.save(blockProps);
return createElement("div", innerBlocksProps);
}
//# sourceMappingURL=save.js.map