diff --git a/src/oik-blocklist/blocklist.js b/src/oik-blocklist/blocklist.js index be979f6..c4ccd96 100644 --- a/src/oik-blocklist/blocklist.js +++ b/src/oik-blocklist/blocklist.js @@ -1,19 +1,18 @@ /* * Block list renderer - displays the Block list for the selected namespace prefix * - * @copyright (C) Copyright Bobbing Wide 2019 + * @copyright (C) Copyright Bobbing Wide 2019,2021 * @author Herb Miller @bobbingwide * */ -const { getBlockType, getBlockTypes, getBlockContent, serialize } = wp.blocks; -const { BlockIcon } = wp.blockEditor; -const { Fragment, renderToString } = wp.element; -// Get just the __() localization function from wp.i18n -//const { renderToString } = wp.element.renderToString; -const { __ } = wp.i18n; -const { select } = wp.data; -const { addQueryArgs} = wp.url; +import { getBlockType, getBlockTypes, getBlockContent, serialize } from '@wordpress/blocks'; +import { BlockIcon } from '@wordpress/block-editor'; +import { Icon } from '@wordpress/components'; +import { Fragment, renderToString } from '@wordpress/element'; +import { __ } from '@wordpress/i18n'; +import { select } from '@wordpress/data'; +import { addQueryArgs } from '@wordpress/url'; import { BlockiconStyled, BlockSupportsInserter } from '../oik-blockicon/blockicons.js'; import { getNameSpace} from './blockprefix.js'; @@ -106,9 +105,6 @@ function getBlockLink( block ) { function BlockListItem( block, showBlockLink ) { -/* { block.icon */ - - //console.log( block ); var blockLink = null; if ( showBlockLink ) { @@ -122,11 +118,10 @@ function BlockListItem( block, showBlockLink ) { var blockSupportsInserter = null; blockSupportsInserter = BlockSupportsInserter( block) ; - return(
- +
@@ -148,19 +143,15 @@ function BlockListItem( block, showBlockLink ) {
{block.description}
- -
); } - /** * Removed BlockCreateItem - replaced by BlockCreateBlockLink */ - /** * Note that the variation parameter is the parent name for a variation. * If this parameter is not set then we're creating a normal block.