UNPKG

@gechiui/block-editor

Version:
45 lines (38 loc) 1.34 kB
import { createElement, Fragment } from "@gechiui/element"; /** * External dependencies */ import { View } from 'react-native'; /** * GeChiUI dependencies */ import { Children } from '@gechiui/element'; import { BottomSheetConsumer } from '@gechiui/components'; import warning from '@gechiui/warning'; /** * Internal dependencies */ import groups from './groups'; import { useBlockEditContext } from '../block-edit/context'; import { BlockSettingsButton } from '../block-settings'; export default function InspectorControlsFill(_ref) { var _groups$group; let { children, __experimentalGroup: group = 'default', ...props } = _ref; const { isSelected } = useBlockEditContext(); const Fill = (_groups$group = groups[group]) === null || _groups$group === void 0 ? void 0 : _groups$group.Fill; if (!Fill) { typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production" ? warning(`Unknown InspectorControl group "${group}" provided.`) : void 0; return null; } if (!isSelected) { return null; } return createElement(Fragment, null, createElement(Fill, props, createElement(BottomSheetConsumer, null, () => createElement(View, null, children))), Children.count(children) > 0 && createElement(BlockSettingsButton, null)); } //# sourceMappingURL=fill.native.js.map