From f75529402dc970c76e812eb1a10d052ab9b21506 Mon Sep 17 00:00:00 2001 From: rayelliott Date: Sun, 10 May 2020 15:28:18 +0000 Subject: [PATCH] update snippets --- UltiSnips/javascript.snippets | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/UltiSnips/javascript.snippets b/UltiSnips/javascript.snippets index a725c45..324a597 100644 --- a/UltiSnips/javascript.snippets +++ b/UltiSnips/javascript.snippets @@ -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
Hello World, step 1 (from the editor).
; + }, + save() { + return
Hello World, step 1 (from the frontend).
; + }, +} ); +endsnippet