@wordpress/block-library
Version:
Block library for the WordPress editor.
18 lines (17 loc) • 648 B
JavaScript
import { getSpacingPresetCssVar, useBlockProps } from "@wordpress/block-editor";
import { jsx } from "react/jsx-runtime";
// packages/block-library/src/spacer/save.jsx
function save({ attributes }) {
const { height, width, style } = attributes;
const { layout: { selfStretch } = {} } = style || {};
const finalHeight = selfStretch === "fill" || selfStretch === "fit" ? void 0 : height;
return /* @__PURE__ */ jsx("div", { ...useBlockProps.save({
style: {
height: getSpacingPresetCssVar(finalHeight),
width: getSpacingPresetCssVar(width)
},
"aria-hidden": true
}) });
}
export { save as default };
//# sourceMappingURL=save.mjs.map