@wordpress/block-editor
Version:
8 lines (7 loc) • 1.04 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/hooks/use-shadow-props.js"],
"sourcesContent": ["/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the shadow\n// block support is being skipped for a block but the shadow related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's shadow support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Shadow block support derived CSS classes & styles.\n */\nexport function getShadowClassesAndStyles( attributes ) {\n\tconst shadow = attributes.style?.shadow || '';\n\n\treturn {\n\t\tstyle: getInlineStyles( { shadow } ),\n\t};\n}\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAgC;AAazB,SAAS,0BAA2B,YAAa;AACvD,QAAM,SAAS,WAAW,OAAO,UAAU;AAE3C,SAAO;AAAA,IACN,WAAO,8BAAiB,EAAE,OAAO,CAAE;AAAA,EACpC;AACD;",
"names": []
}