UNPKG

@wordpress/block-library

Version:
59 lines (58 loc) • 1.48 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let _wordpress_block_editor = require("@wordpress/block-editor"); let react_jsx_runtime = require("react/jsx-runtime"); // packages/block-library/src/audio/deprecated.jsx var deprecated_default = [{ attributes: { src: { type: "string", source: "attribute", selector: "audio", attribute: "src" }, caption: { type: "string", source: "html", selector: "figcaption" }, id: { type: "number" }, autoplay: { type: "boolean", source: "attribute", selector: "audio", attribute: "autoplay" }, loop: { type: "boolean", source: "attribute", selector: "audio", attribute: "loop" }, preload: { type: "string", source: "attribute", selector: "audio", attribute: "preload" } }, supports: { align: true }, save({ attributes }) { const { autoplay, caption, loop, preload, src } = attributes; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("figure", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("audio", { controls: "controls", src, autoPlay: autoplay, loop, preload }), !_wordpress_block_editor.RichText.isEmpty(caption) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_block_editor.RichText.Content, { tagName: "figcaption", value: caption })] }); } }]; exports.default = deprecated_default; //# sourceMappingURL=deprecated.cjs.map