woocommerce/plugins/woocommerce-blocks/assets/js/base/context/inner-block-parent-name-con...

12 lines
352 B
JavaScript

/**
* External dependencies
*/
import { createContext, useContext } from '@wordpress/element';
const InnerBlockParentNameContext = createContext( { blockName: null } );
export const useInnerBlockParentNameContext = () =>
useContext( InnerBlockParentNameContext );
export const InnerBlockParentNameProvider =
InnerBlockParentNameContext.Provider;