woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/get-block-map.js
2021-12-10 12:03:04 +00:00

18 lines
409 B
JavaScript

/**
* External dependencies
*/
import { getRegisteredBlockComponents } from '@woocommerce/blocks-registry';
/**
* Internal dependencies
*/
import '../blocks/component-init';
/**
* Map named Blocks to defined React Components to render on the frontend.
*
* @param {string} blockName Name of the parent block.
*/
export const getBlockMap = ( blockName ) =>
getRegisteredBlockComponents( blockName );