UNPKG

@wordpress/block-library

Version:
74 lines (73 loc) 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _blockEditor = require("@wordpress/block-editor"); var _jsxRuntime = require("react/jsx-runtime"); /** * WordPress dependencies */ var _default = exports.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, _jsxRuntime.jsxs)("figure", { 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 })] }); } }]; //# sourceMappingURL=deprecated.js.map