@wordpress/block-editor
Version:
34 lines (27 loc) • 728 B
JavaScript
import { createElement } from "@wordpress/element";
/**
* WordPress dependencies
*/
import { privateApis as componentsPrivateApis } from '@wordpress/components';
/**
* Internal dependencies
*/
import { unlock } from '../../lock-unlock';
import useDisplayBlockControls from '../use-display-block-controls';
const {
createPrivateSlotFill
} = unlock(componentsPrivateApis);
const {
Fill,
Slot
} = createPrivateSlotFill('BlockInformation');
const BlockInfo = props => {
const isDisplayed = useDisplayBlockControls();
if (!isDisplayed) {
return null;
}
return createElement(Fill, props);
};
BlockInfo.Slot = props => createElement(Slot, props);
export default BlockInfo;
//# sourceMappingURL=index.js.map