Skip to content

Commit

Permalink
Polish block wrapper elements file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZebulanStanphill committed Mar 31, 2020
1 parent 3425305 commit 2620327
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* HTML elements that can be used as a block wrapper.
*/
const ELEMENTS = [
'p',
'div',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 2620327

Please sign in to comment.