@wordpress/block-library
Version:
Block library for the WordPress editor.
38 lines (36 loc) • 935 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = save;
var _blockEditor = require("@wordpress/block-editor");
var _jsxRuntime = require("react/jsx-runtime");
/**
* WordPress dependencies
*/
function save({
attributes
}) {
const {
autoplay,
caption,
loop,
preload,
src
} = attributes;
return src && /*#__PURE__*/(0, _jsxRuntime.jsxs)("figure", {
..._blockEditor.useBlockProps.save(),
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("audio", {
controls: "controls",
src: src,
autoPlay: autoplay,
loop: loop,
preload: preload
}), !_blockEditor.RichText.isEmpty(caption) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_blockEditor.RichText.Content, {
tagName: "figcaption",
value: caption,
className: (0, _blockEditor.__experimentalGetElementClassName)('caption')
})]
});
}
//# sourceMappingURL=save.js.map
;