Skip to content

Commit

Permalink
Implement mock block-wrapper for mobile version. (#20772)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioEstevao authored and jbinda committed Mar 11, 2020
1 parent 0507f5d commit 2d25271
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const elements = [
'p',
'div',
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'ol',
'ul',
'li',
'figure',
'nav',
];

const ExtendedBlockComponent = elements.reduce( ( acc, element ) => {
acc[ element ] = element;
return acc;
}, String );

export const Block = ExtendedBlockComponent;
1 change: 1 addition & 0 deletions packages/block-editor/src/components/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export { default as BlockMover } from './block-mover';
export { default as BlockToolbar } from './block-toolbar';
export { default as DefaultBlockAppender } from './default-block-appender';
export { default as Inserter } from './inserter';
export { Block as __experimentalBlock } from './block-list/block-wrapper';

// State Related Components
export { default as BlockEditorProvider } from './provider';

0 comments on commit 2d25271

Please sign in to comment.