@razorpay/blade
Version:
The Design System that powers Razorpay
44 lines (39 loc) • 1.48 kB
JavaScript
import React__default from 'react';
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/no-explicit-any */
var BottomSheetContext = /*#__PURE__*/React__default.createContext({
headerHeight: 0,
contentHeight: 0,
footerHeight: 0,
isHeaderFloating: false,
setContentHeight: function setContentHeight() {},
setHeaderHeight: function setHeaderHeight() {},
setFooterHeight: function setFooterHeight() {},
setHasBodyPadding: function setHasBodyPadding() {},
setIsHeaderEmpty: function setIsHeaderEmpty() {},
close: function close() {},
scrollRef: null,
bind: null,
isOpen: false,
positionY: 0,
isInBottomSheet: false,
defaultInitialFocusRef: {
current: null
}
});
var useBottomSheetContext = function useBottomSheetContext() {
var state = React__default.useContext(BottomSheetContext);
return state;
};
var BottomSheetAndDropdownGlueContext = /*#__PURE__*/React__default.createContext(null);
/**
* This hook provides the bridge between Dropdown And BottomSheet
*
* You can hover over the return types to get jsdoc and more information about each
*/
var useBottomSheetAndDropdownGlue = function useBottomSheetAndDropdownGlue() {
var state = React__default.useContext(BottomSheetAndDropdownGlueContext);
return state;
};
export { BottomSheetAndDropdownGlueContext, BottomSheetContext, useBottomSheetAndDropdownGlue, useBottomSheetContext };
//# sourceMappingURL=BottomSheetContext.js.map