Skip to content

Commit

Permalink
Basic list with icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Aug 1, 2023
1 parent 1520739 commit 78711cf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/block-editor/src/hooks/auto-inserting-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useSelect } from '@wordpress/data';
/**
* Internal dependencies
*/
import { InspectorControls } from '../components';
import { BlockIcon, InspectorControls } from '../components';

function AutoInsertingBlocksControl( props ) {
const blocks = useSelect( ( select ) => {
Expand All @@ -29,7 +29,19 @@ function AutoInsertingBlocksControl( props ) {
<InspectorControls>
<PanelBody title={ __( 'Plugins' ) } initialOpen={ true }>
{ autoInsertedBlocksForCurrentBlock.map( ( block ) => {
return <div key={ block.name }>{ block.title }</div>;
return (
<div
key={ block.name }
className="block-editor-block-card"
>
<BlockIcon icon={ block.icon } />
<div className="block-editor-block-card__content">
<h2 className="block-editor-block-card__title">
{ block.title }
</h2>
</div>
</div>
);
} ) }
</PanelBody>
</InspectorControls>
Expand Down

0 comments on commit 78711cf

Please sign in to comment.