@wordpress/block-editor
Version:
31 lines (28 loc) • 894 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getShadowClassesAndStyles = getShadowClassesAndStyles;
var _style = require("./style");
/**
* Internal dependencies
*/
// This utility is intended to assist where the serialization of the shadow
// block support is being skipped for a block but the shadow related CSS classes
// & styles still need to be generated so they can be applied to inner elements.
/**
* Provides the CSS class names and inline styles for a block's shadow support
* attributes.
*
* @param {Object} attributes Block attributes.
* @return {Object} Shadow block support derived CSS classes & styles.
*/
function getShadowClassesAndStyles(attributes) {
const shadow = attributes.style?.shadow || '';
return {
style: (0, _style.getInlineStyles)({
shadow
})
};
}
//# sourceMappingURL=use-shadow-props.js.map
;