@wordpress/block-library
Version:
Block library for the WordPress editor.
1 lines • 1.19 kB
Source Map (JSON)
{"version":3,"file":"save.mjs","names":[],"sources":["../../src/audio/save.jsx"],"sourcesContent":["import {\n\tRichText,\n\tuseBlockProps,\n\t__experimentalGetElementClassName,\n} from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { autoplay, caption, loop, preload, src } = attributes;\n\n\treturn (\n\t\tsrc && (\n\t\t\t<figure { ...useBlockProps.save() }>\n\t\t\t\t<audio\n\t\t\t\t\tcontrols=\"controls\"\n\t\t\t\t\tsrc={ src }\n\t\t\t\t\tautoPlay={ autoplay }\n\t\t\t\t\tloop={ loop }\n\t\t\t\t\tpreload={ preload }\n\t\t\t\t/>\n\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\tclassName={ __experimentalGetElementClassName(\n\t\t\t\t\t\t\t'caption'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</figure>\n\t\t)\n\t);\n}\n"],"mappings":";;;AAMA,SAAwB,KAAM,EAAE,cAAe;CAC9C,MAAM,EAAE,UAAU,SAAS,MAAM,SAAS,QAAQ;CAElD,OACC,OACC,qBAAC,UAAD;EAAQ,GAAK,cAAc,KAAK;EAAhC,UAAA,CACC,oBAAC,SAAD;GACC,UAAS;GACH;GACN,UAAW;GACJ;GACG;EACV,CAAA,GACC,CAAE,SAAS,QAAS,OAAQ,KAC7B,oBAAC,SAAS,SAAV;GACC,SAAQ;GACR,OAAQ;GACR,WAAY,kCACX,SACD;EACA,CAAA,CAEK;;AAGX"}