@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 1.25 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/spacer/save.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useBlockProps, getSpacingPresetCssVar } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { height, width, style } = attributes;\n\tconst { layout: { selfStretch } = {} } = style || {};\n\t// If selfStretch is set to 'fill' or 'fit', don't set default height.\n\tconst finalHeight =\n\t\tselfStretch === 'fill' || selfStretch === 'fit' ? undefined : height;\n\treturn (\n\t\t<div\n\t\t\t{ ...useBlockProps.save( {\n\t\t\t\tstyle: {\n\t\t\t\t\theight: getSpacingPresetCssVar( finalHeight ),\n\t\t\t\t\twidth: getSpacingPresetCssVar( width ),\n\t\t\t\t},\n\t\t\t\t'aria-hidden': true,\n\t\t\t} ) }\n\t\t/>\n\t);\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAAsD;AASpD;AAPa,SAAR,KAAuB,EAAE,WAAW,GAAI;AAC9C,QAAM,EAAE,QAAQ,OAAO,MAAM,IAAI;AACjC,QAAM,EAAE,QAAQ,EAAE,YAAY,IAAI,CAAC,EAAE,IAAI,SAAS,CAAC;AAEnD,QAAM,cACL,gBAAgB,UAAU,gBAAgB,QAAQ,SAAY;AAC/D,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,kCAAc,KAAM;AAAA,QACxB,OAAO;AAAA,UACN,YAAQ,4CAAwB,WAAY;AAAA,UAC5C,WAAO,4CAAwB,KAAM;AAAA,QACtC;AAAA,QACA,eAAe;AAAA,MAChB,CAAE;AAAA;AAAA,EACH;AAEF;",
"names": []
}