import BlocksContext from './BlocksContext'; import RenderBlockSettings from './BlockSettings'; import ErrorCard from './ErrorCard'; const { __ } = wp.i18n; const { Fragment } = wp.element; const { ToggleControl } = wp.components; const BlockList = () => { return (
{ context => ( context.state.isLoading ? (
) : ( { context.state.blocks.length ? context.filteredBlocks.map( ( block ) => (

{ block.title }

{ typeof( block.description ) === 'string' && block.description }

{ context.toggleBlock( block.name, status ); } } /> { block.hasSettings && ( ) }
) ) : ( ) }
) ) }
); }; export default BlockList;