Skip to content

Commit

Permalink
block-editor: expose BlockPreview block
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed Jul 31, 2019
1 parent 097bc0f commit ba461d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ Undocumented declaration.

Undocumented declaration.

<a name="BlockPreview" href="#BlockPreview">#</a> **BlockPreview**

Undocumented declaration.

<a name="BlockSelectionClearer" href="#BlockSelectionClearer">#</a> **BlockSelectionClearer**

Undocumented declaration.
Expand Down
5 changes: 2 additions & 3 deletions packages/block-editor/src/components/block-preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { Disabled } from '@wordpress/components';
import { withSelect } from '@wordpress/data';

Expand All @@ -24,14 +23,14 @@ import BlockList from '../block-list';
*
* @return {WPElement} Rendered element.
*/
function BlockPreview( { blocks, settings, className, isScaled } ) {
export function BlockPreview( { blocks, settings, className, isScaled } ) {
if ( ! blocks ) {
return null;
}
return (
<Disabled
aria-hidden
className={ classnames(
className={ classnames(
'editor-block-preview',
'block-editor-block-preview',
'editor-styles-wrapper',
Expand Down
1 change: 1 addition & 0 deletions packages/block-editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export { default as BlockEditorKeyboardShortcuts } from './block-editor-keyboard
export { default as BlockInspector } from './block-inspector';
export { default as BlockList } from './block-list';
export { default as BlockMover } from './block-mover';
export { default as BlockPreview } from './block-preview';
export { default as BlockSelectionClearer } from './block-selection-clearer';
export { default as BlockSettingsMenu } from './block-settings-menu';
export { default as BlockTitle } from './block-title';
Expand Down

0 comments on commit ba461d5

Please sign in to comment.