From 26203277f91ecef93e3e0f76368432b530c96460 Mon Sep 17 00:00:00 2001 From: Zebulan Stanphill Date: Tue, 31 Mar 2020 16:58:55 -0500 Subject: [PATCH] Polish block wrapper elements file. --- .../{block-elements.js => block-wrapper-elements.js} | 3 +++ .../block-editor/src/components/block-list/block-wrapper.js | 2 +- .../src/components/block-list/block-wrapper.native.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) rename packages/block-editor/src/components/block-list/{block-elements.js => block-wrapper-elements.js} (76%) diff --git a/packages/block-editor/src/components/block-list/block-elements.js b/packages/block-editor/src/components/block-list/block-wrapper-elements.js similarity index 76% rename from packages/block-editor/src/components/block-list/block-elements.js rename to packages/block-editor/src/components/block-list/block-wrapper-elements.js index 1d71649a1cc479..ce8eb456c97722 100644 --- a/packages/block-editor/src/components/block-list/block-elements.js +++ b/packages/block-editor/src/components/block-list/block-wrapper-elements.js @@ -1,3 +1,6 @@ +/** + * HTML elements that can be used as a block wrapper. + */ const ELEMENTS = [ 'p', 'div', diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index 80a63a15df6ceb..3c166f81b658bf 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -27,7 +27,7 @@ import { isInsideRootBlock } from '../../utils/dom'; import useMovingAnimation from './moving-animation'; import { Context, BlockNodes } from './root-container'; import { BlockContext } from './block'; -import ELEMENTS from './block-elements'; +import ELEMENTS from './block-wrapper-elements'; const BlockComponent = forwardRef( ( { children, tagName = 'div', __unstableIsHtml, ...props }, wrapper ) => { diff --git a/packages/block-editor/src/components/block-list/block-wrapper.native.js b/packages/block-editor/src/components/block-list/block-wrapper.native.js index c97dae59059f54..507e17bb982ec0 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.native.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.native.js @@ -1,7 +1,7 @@ /** * Internal dependencies */ -import ELEMENTS from './block-elements'; +import ELEMENTS from './block-wrapper-elements'; const ExtendedBlockComponent = ELEMENTS.reduce( ( acc, element ) => { acc[ element ] = element;