@wordpress/block-library
Version:
Block library for the WordPress editor.
22 lines (21 loc) • 483 B
JavaScript
// packages/block-library/src/utils/migrate-text-align.js
function migrate_text_align_default(attributes) {
const { textAlign, ...restAttributes } = attributes;
if (!textAlign) {
return attributes;
}
return {
...restAttributes,
style: {
...attributes.style,
typography: {
...attributes.style?.typography,
textAlign
}
}
};
}
export {
migrate_text_align_default as default
};
//# sourceMappingURL=migrate-text-align.js.map