@wordpress/components
Version:
UI components for WordPress.
35 lines (31 loc) • 936 B
JavaScript
import { createElement, Fragment } from "@wordpress/element";
/**
* External dependencies
*/
import { SafeAreaView } from 'react-native';
/**
* WordPress dependencies
*/
import { Children } from '@wordpress/element';
import { createSlotFill, BottomSheetConsumer } from '@wordpress/components';
const {
Fill,
Slot
} = createSlotFill('BottomSheetSubSheet');
const BottomSheetSubSheet = ({
children,
navigationButton,
showSheet,
isFullScreen
}) => {
return createElement(Fragment, null, showSheet && createElement(Fill, null, createElement(SafeAreaView, null, createElement(BottomSheetConsumer, null, ({
setIsFullScreen
}) => {
setIsFullScreen(isFullScreen);
return children;
}))), Children.count(children) > 0 && navigationButton);
};
BottomSheetSubSheet.Slot = Slot;
BottomSheetSubSheet.screenName = 'BottomSheetSubSheet';
export default BottomSheetSubSheet;
//# sourceMappingURL=index.native.js.map