update snippets
This commit is contained in:
parent
744744ba71
commit
f75529402d
|
@ -116,3 +116,25 @@ endsnippet
|
|||
snippet tb "this ... = ... .bind(this);"
|
||||
this.$1 = this.$1.bind(this);
|
||||
endsnippet
|
||||
|
||||
snippet wprb
|
||||
import { registerBlockType } from '@wordpress/blocks';
|
||||
|
||||
const blockStyle = {
|
||||
color: red,
|
||||
backgroundColor: pink,
|
||||
};
|
||||
|
||||
registerBlockType( '${1:namespace}/${2:block-name}', {
|
||||
title: '$3',
|
||||
icon: '${4:universal-access-alt}',
|
||||
category: '${5:layout}',
|
||||
example: {},
|
||||
edit() {
|
||||
return <div style={ blockStyle }>Hello World, step 1 (from the editor).</div>;
|
||||
},
|
||||
save() {
|
||||
return <div style={ blockStyle }>Hello World, step 1 (from the frontend).</div>;
|
||||
},
|
||||
} );
|
||||
endsnippet
|
||||
|
|
Loading…
Reference in New Issue