@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 1.13 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/quote/save.js"],
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { textAlign, citation } = attributes;\n\n\tconst className = clsx( {\n\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t} );\n\n\treturn (\n\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t<InnerBlocks.Content />\n\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t) }\n\t\t</blockquote>\n\t);\n}\n"],
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,aAAa,UAAU,qBAAqB;AAUnD,SACC,KADD;AARa,SAAR,KAAuB,EAAE,WAAW,GAAI;AAC9C,QAAM,EAAE,WAAW,SAAS,IAAI;AAEhC,QAAM,YAAY,KAAM;AAAA,IACvB,CAAE,kBAAmB,SAAU,EAAG,GAAG;AAAA,EACtC,CAAE;AAEF,SACC,qBAAC,gBAAa,GAAG,cAAc,KAAM,EAAE,UAAU,CAAE,GAClD;AAAA,wBAAC,YAAY,SAAZ,EAAoB;AAAA,IACnB,CAAE,SAAS,QAAS,QAAS,KAC9B,oBAAC,SAAS,SAAT,EAAiB,SAAQ,QAAO,OAAQ,UAAW;AAAA,KAEtD;AAEF;",
"names": []
}