From 051367e209fb5bd46c4131facccdb6cf30ab3439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Ventura?= Date: Wed, 3 May 2017 14:45:54 +0200 Subject: [PATCH] Add "Separator" (hr) block to the library. --- blocks/library/index.js | 1 + blocks/library/separator/index.js | 21 +++++++++++++++++++++ blocks/library/separator/style.scss | 4 ++++ post-content.js | 4 ++++ 4 files changed, 30 insertions(+) create mode 100644 blocks/library/separator/index.js create mode 100644 blocks/library/separator/style.scss diff --git a/blocks/library/index.js b/blocks/library/index.js index d317bb73d18661..4c2d81d114e105 100644 --- a/blocks/library/index.js +++ b/blocks/library/index.js @@ -5,3 +5,4 @@ import './image'; import './text'; import './list'; import './quote'; +import './separator'; diff --git a/blocks/library/separator/index.js b/blocks/library/separator/index.js new file mode 100644 index 00000000000000..56f2c60b613f69 --- /dev/null +++ b/blocks/library/separator/index.js @@ -0,0 +1,21 @@ +/** + * Internal dependencies + */ +import './style.scss'; +import { registerBlock } from 'api'; + +registerBlock( 'core/separator', { + title: wp.i18n.__( 'Separator' ), + + icon: 'minus', + + category: 'common', + + edit() { + return
; + }, + + save() { + return
; + } +} ); diff --git a/blocks/library/separator/style.scss b/blocks/library/separator/style.scss new file mode 100644 index 00000000000000..daaf2b20733947 --- /dev/null +++ b/blocks/library/separator/style.scss @@ -0,0 +1,4 @@ +.blocks-separator { + border: none; + border-bottom: 2px solid $light-gray-800; +} diff --git a/post-content.js b/post-content.js index 0892b6f00b9e04..bbadbcddb7b804 100644 --- a/post-content.js +++ b/post-content.js @@ -12,6 +12,10 @@ window._wpGutenbergPost = { '

I imagine prior to the launch of the iPod, or the iPhone, there were teams saying the same thing: the copy + paste guys are so close to being ready and we know Walt Mossberg is going to ding us for this so let\'s just not ship to the manufacturers in China for just a few more weeks… The Apple teams were probably embarrassed. But if you\'re not embarrassed when you ship your first version you waited too long.

', '', + '', + '
', + '', + '', '
', '',