UNPKG

@ozen-ui/kit

Version:

React component library

50 lines (49 loc) 1.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useBottomSheetBaseContext = exports.BottomSheetBaseContext = void 0; var react_1 = require("react"); var environment_1 = require("../../../constants/environment"); exports.BottomSheetBaseContext = (0, react_1.createContext)({ rootRef: { current: null, }, scrollRef: { current: null, }, contentRef: { current: null, }, blocksRefs: { current: {}, }, minSnap: 0, maxSnap: 0, defaultSnap: 0, snaps: [], onClose: function () { }, isClosable: false, canDrag: { current: true, }, snapsControl: { point: { current: 0, }, to: function () { }, toDefault: function () { }, toClosed: function () { }, toAnimated: function () { }, }, findClosestSnap: { current: function () { return 0; }, }, addBlockRef: function () { }, }); var useBottomSheetBaseContext = function () { return (0, react_1.useContext)(exports.BottomSheetBaseContext); }; exports.useBottomSheetBaseContext = useBottomSheetBaseContext; // Именованный провайдер if (environment_1.isDev) { exports.BottomSheetBaseContext.displayName = 'BottomSheetBaseContext'; }