@wordpress/block-library
Version:
Block library for the WordPress editor.
17 lines (14 loc) • 308 B
JavaScript
import { createBlock } from '@wordpress/blocks';
const transforms = {
from: [
{
type: 'block',
blocks: [ 'core/post-author' ],
transform: ( { textAlign } ) =>
createBlock( 'core/post-author-name', {
style: { typography: { textAlign } },
} ),
},
],
};
export default transforms;