Last active
October 8, 2018 15:17
-
-
Save jorgefilipecosta/b733f1745531dc9758c6eba0838ae3f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function() { | |
var registerBlockType = wp.blocks.registerBlockType; | |
var el = wp.element.createElement; | |
registerBlockType( 'test/no-align-default-align', { | |
title: 'Test No Align and Default Align', | |
icon: 'cart', | |
category: 'common', | |
attributes: { | |
align: { | |
type: 'string', | |
default: 'right', | |
}, | |
}, | |
supports: { | |
align: [ 'left', 'center', 'right' ], | |
}, | |
edit: function( props ) { | |
return el( 'div', { style: { outline: '1px solid gray', padding: 5 } }, | |
'Test No Align and Default Align Block' | |
); | |
}, | |
save: function() { | |
return el( 'div', { style: { outline: '1px solid gray', padding: 5 } }, | |
'Test No Align and Default Align Block' | |
); | |
}, | |
} ); | |
} )(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment