@gechiui/components
Version:
UI components for GeChiUI.
48 lines (40 loc) • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _element = require("@gechiui/element");
var _reactNative = require("react-native");
var _components = require("@gechiui/components");
/**
* External dependencies
*/
/**
* GeChiUI dependencies
*/
const {
Fill,
Slot
} = (0, _components.createSlotFill)('BottomSheetSubSheet');
const BottomSheetSubSheet = _ref => {
let {
children,
navigationButton,
showSheet,
isFullScreen
} = _ref;
const {
setIsFullScreen
} = (0, _element.useContext)(_components.BottomSheetContext);
(0, _element.useEffect)(() => {
if (showSheet) {
setIsFullScreen(isFullScreen);
}
}, [showSheet, isFullScreen]);
return (0, _element.createElement)(_element.Fragment, null, showSheet && (0, _element.createElement)(Fill, null, (0, _element.createElement)(_reactNative.SafeAreaView, null, children)), _element.Children.count(children) > 0 && navigationButton);
};
BottomSheetSubSheet.Slot = Slot;
BottomSheetSubSheet.screenName = 'BottomSheetSubSheet';
var _default = BottomSheetSubSheet;
exports.default = _default;
//# sourceMappingURL=index.native.js.map