react-native-drawer-layout 5.0.0-alpha.2 → 5.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/utils/getDrawerWidth.js +1 -1
- package/lib/module/utils/getDrawerWidth.js.map +1 -1
- package/lib/module/utils/useDrawerProgress.js +1 -1
- package/lib/module/utils/useDrawerProgress.js.map +1 -1
- package/lib/module/views/Drawer.js +9 -5
- package/lib/module/views/Drawer.js.map +1 -1
- package/lib/module/views/Drawer.native.js +162 -57
- package/lib/module/views/Drawer.native.js.map +1 -1
- package/lib/module/views/GestureHandler.js +4 -14
- package/lib/module/views/GestureHandler.js.map +1 -1
- package/lib/module/views/GestureHandlerNative.js +1 -1
- package/lib/module/views/GestureHandlerNative.js.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -3
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +4 -4
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/DrawerGestureContext.d.ts +2 -1
- package/lib/typescript/src/utils/DrawerGestureContext.d.ts.map +1 -1
- package/lib/typescript/src/utils/getDrawerWidth.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.d.ts +3 -2
- package/lib/typescript/src/views/Drawer.d.ts.map +1 -1
- package/lib/typescript/src/views/Drawer.native.d.ts +3 -2
- package/lib/typescript/src/views/Drawer.native.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.android.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.d.ts +5 -13
- package/lib/typescript/src/views/GestureHandler.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts +1 -1
- package/lib/typescript/src/views/GestureHandler.ios.d.ts.map +1 -1
- package/lib/typescript/src/views/GestureHandlerNative.d.ts +2 -2
- package/lib/typescript/src/views/GestureHandlerNative.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.d.ts +2 -2
- package/lib/typescript/src/views/Overlay.d.ts.map +1 -1
- package/lib/typescript/src/views/Overlay.native.d.ts +2 -2
- package/lib/typescript/src/views/Overlay.native.d.ts.map +1 -1
- package/package.json +17 -15
- package/src/types.tsx +6 -4
- package/src/utils/getDrawerWidth.tsx +5 -3
- package/src/utils/useDrawerProgress.tsx +1 -1
- package/src/views/Drawer.native.tsx +208 -59
- package/src/views/Drawer.tsx +14 -6
- package/src/views/GestureHandler.tsx +13 -15
- package/src/views/GestureHandlerNative.tsx +5 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { PanGesture } from 'react-native-gesture-handler';
|
|
3
|
+
export declare const DrawerGestureContext: React.Context<PanGesture | undefined>;
|
|
3
4
|
//# sourceMappingURL=DrawerGestureContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerGestureContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerGestureContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DrawerGestureContext.d.ts","sourceRoot":"","sources":["../../../../src/utils/DrawerGestureContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,eAAO,MAAM,oBAAoB,uCAEhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDrawerWidth.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDrawerWidth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAYnE,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;CAChD,
|
|
1
|
+
{"version":3,"file":"getDrawerWidth.d.ts","sourceRoot":"","sources":["../../../../src/utils/getDrawerWidth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAYnE,wBAAgB,oBAAoB,CAAC,EACnC,cAAc,EACd,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAAC;CAChD,UAsBA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,GACZ,EAAE;IACD,WAAW,EAAE,SAAS,CAAC;CACxB,GAAG,MAAM,CAYT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DrawerProps } from '../types.js';
|
|
3
|
+
export declare function Drawer({ direction, drawerPosition, drawerStyle, drawerType, onClose, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, renderDrawerContent, children, style, }: DrawerProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAM5C,wBAAgB,MAAM,CAAC,EACrB,SAAiB,EACjB,cAAuD,EACvD,WAAW,EACX,UAAoB,EACpB,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,IAAI,EACJ,YAAY,EACZ,yBAAyB,EACzB,mBAAmB,EACnB,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,qBAmIb"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DrawerProps } from '../types.js';
|
|
3
|
+
export declare function Drawer({ direction, drawerPosition, drawerStyle, drawerType, configureGestureHandler, hideStatusBarOnOpen, keyboardDismissMode, onClose, onOpen, onGestureStart, onGestureCancel, onGestureEnd, onTransitionStart, onTransitionEnd, open, overlayStyle, overlayAccessibilityLabel, statusBarAnimation, swipeEnabled, swipeEdgeWidth, swipeMinDistance, swipeMinVelocity, renderDrawerContent, children, style, }: DrawerProps): React.JSX.Element;
|
|
3
4
|
//# sourceMappingURL=Drawer.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.native.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Drawer.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAU,CAAC;AAmC5C,wBAAgB,MAAM,CAAC,EACrB,SAA4D,EAC5D,cAAuD,EACvD,WAAW,EACX,UAAoB,EACpB,uBAAuB,EACvB,mBAA2B,EAC3B,mBAA+B,EAC/B,OAAO,EACP,MAAM,EACN,cAAc,EACd,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,IAAI,EACJ,YAAY,EACZ,yBAAyB,EACzB,kBAA4B,EAC5B,YAEyB,EACzB,cAAiC,EACjC,gBAAqC,EACrC,gBAAqC,EACrC,mBAAmB,EACnB,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,qBAymBb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './GestureHandlerNative';
|
|
1
|
+
export * from './GestureHandlerNative.js';
|
|
2
2
|
//# sourceMappingURL=GestureHandler.android.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.android.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.android.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"GestureHandler.android.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.android.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAAwB,CAAC"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PanGesture, PanGestureConfig } from 'react-native-gesture-handler';
|
|
4
4
|
type GestureDetectorProps = {
|
|
5
|
-
gesture:
|
|
5
|
+
gesture: PanGesture | undefined;
|
|
6
6
|
userSelect?: 'none' | 'auto' | 'text';
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export declare const GestureDetector: ({ gesture: _0, userSelect: _1, children, }: GestureDetectorProps) =>
|
|
9
|
+
export declare const GestureDetector: ({ gesture: _0, userSelect: _1, children, }: GestureDetectorProps) => React.JSX.Element;
|
|
10
10
|
export declare const GestureHandlerRootView: typeof View;
|
|
11
|
-
export declare
|
|
12
|
-
export
|
|
13
|
-
UNDETERMINED = 0,
|
|
14
|
-
FAILED = 1,
|
|
15
|
-
BEGAN = 2,
|
|
16
|
-
CANCELLED = 3,
|
|
17
|
-
ACTIVE = 4,
|
|
18
|
-
END = 5
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
11
|
+
export declare function usePanGesture(config: PanGestureConfig): undefined;
|
|
12
|
+
export type { PanGesture, PanGestureConfig, } from 'react-native-gesture-handler';
|
|
21
13
|
//# sourceMappingURL=GestureHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"GestureHandler.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AAEtC,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,4CAI7B,oBAAoB,sBAEtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAO,CAAC;AAE3C,wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,aAIrD;AAED,YAAY,EACV,UAAU,EACV,gBAAgB,GACjB,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './GestureHandlerNative';
|
|
1
|
+
export * from './GestureHandlerNative.js';
|
|
2
2
|
//# sourceMappingURL=GestureHandler.ios.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandler.ios.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.ios.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"GestureHandler.ios.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandler.ios.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAAwB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { PanGesture, PanGestureConfig, } from 'react-native-gesture-handler';
|
|
2
|
+
export { GestureDetector, GestureHandlerRootView, usePanGesture, } from 'react-native-gesture-handler';
|
|
3
3
|
//# sourceMappingURL=GestureHandlerNative.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"GestureHandlerNative.d.ts","sourceRoot":"","sources":["../../../../src/views/GestureHandlerNative.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,aAAa,GACd,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OverlayProps } from '../types';
|
|
2
|
-
export declare function Overlay({ open, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
|
+
export declare function Overlay({ open, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,kBAAmC,EACnC,GAAG,IAAI,EACR,EAAE,YAAY,+BAoBd"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { OverlayProps } from '../types';
|
|
2
|
-
export declare function Overlay({ progress, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react
|
|
1
|
+
import type { OverlayProps } from '../types.js';
|
|
2
|
+
export declare function Overlay({ progress, onPress, style, accessibilityLabel, ...rest }: OverlayProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=Overlay.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Overlay.native.d.ts","sourceRoot":"","sources":["../../../../src/views/Overlay.native.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAU,CAAC;AAI7C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,kBAAmC,EACnC,GAAG,IAAI,EACR,EAAE,YAAY,+BAiCd"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-drawer-layout",
|
|
3
3
|
"description": "Drawer component for React Native",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.20",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-component",
|
|
7
7
|
"react-component",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"types": "./lib/typescript/src/index.d.ts",
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
28
|
-
"source": "./src/index.tsx",
|
|
28
|
+
"@react-navigation/source": "./src/index.tsx",
|
|
29
29
|
"types": "./lib/typescript/src/index.d.ts",
|
|
30
30
|
"default": "./lib/module/index.js"
|
|
31
31
|
},
|
|
@@ -42,23 +42,25 @@
|
|
|
42
42
|
"clean": "del lib"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"
|
|
46
|
-
"use-latest-callback": "^0.3.2"
|
|
45
|
+
"use-latest-callback": "^0.3.5"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"react
|
|
52
|
-
"react-native
|
|
53
|
-
"react-native-
|
|
54
|
-
"react-native-
|
|
55
|
-
"
|
|
48
|
+
"@types/react": "~19.2.17",
|
|
49
|
+
"del-cli": "^7.0.0",
|
|
50
|
+
"react": "19.2.3",
|
|
51
|
+
"react-native": "0.85.3",
|
|
52
|
+
"react-native-builder-bob": "^0.43.0",
|
|
53
|
+
"react-native-gesture-handler": "^3.0.2",
|
|
54
|
+
"react-native-reanimated": "4.5.3",
|
|
55
|
+
"react-native-worklets": "0.11.3",
|
|
56
|
+
"typescript": "^6.0.3"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"react": ">= 19.
|
|
59
|
+
"react": ">= 19.2.0",
|
|
59
60
|
"react-native": "*",
|
|
60
|
-
"react-native-gesture-handler": ">=
|
|
61
|
-
"react-native-reanimated": ">= 4.0.0"
|
|
61
|
+
"react-native-gesture-handler": ">= 3.0.0",
|
|
62
|
+
"react-native-reanimated": ">= 4.0.0",
|
|
63
|
+
"react-native-worklets": ">= 0.4.0"
|
|
62
64
|
},
|
|
63
65
|
"react-native-builder-bob": {
|
|
64
66
|
"source": "src",
|
|
@@ -78,5 +80,5 @@
|
|
|
78
80
|
]
|
|
79
81
|
]
|
|
80
82
|
},
|
|
81
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "7db23d23b7808c2cc6e8fae82982f0b60d5a0003"
|
|
82
84
|
}
|
package/src/types.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { StyleProp, View, ViewStyle } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { PanGestureConfig } from 'react-native-gesture-handler';
|
|
4
4
|
import type { SharedValue } from 'react-native-reanimated';
|
|
5
5
|
|
|
6
6
|
export type DrawerProps = {
|
|
@@ -90,7 +90,7 @@ export type DrawerProps = {
|
|
|
90
90
|
overlayAccessibilityLabel?: string | undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
|
-
* Whether the keyboard should be dismissed when the
|
|
93
|
+
* Whether the keyboard should be dismissed when the drawer starts opening or closing.
|
|
94
94
|
* Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.
|
|
95
95
|
*/
|
|
96
96
|
keyboardDismissMode?: 'none' | 'on-drag' | undefined;
|
|
@@ -135,9 +135,11 @@ export type DrawerProps = {
|
|
|
135
135
|
swipeMinVelocity?: number | undefined;
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
|
-
* Function to modify the pan gesture
|
|
138
|
+
* Function to modify the pan gesture config.
|
|
139
139
|
*/
|
|
140
|
-
configureGestureHandler?:
|
|
140
|
+
configureGestureHandler?:
|
|
141
|
+
| ((gesture: PanGestureConfig) => PanGestureConfig)
|
|
142
|
+
| undefined;
|
|
141
143
|
|
|
142
144
|
/**
|
|
143
145
|
* Style object for the wrapper view.
|
|
@@ -19,10 +19,12 @@ export function getDrawerWidthNative({
|
|
|
19
19
|
}) {
|
|
20
20
|
'worklet';
|
|
21
21
|
|
|
22
|
-
const defaultWidth =
|
|
23
|
-
containerWidth - APPROX_APP_BAR_HEIGHT <=
|
|
22
|
+
const defaultWidth = Math.max(
|
|
23
|
+
containerWidth - APPROX_APP_BAR_HEIGHT <= DEFAULT_DRAWER_WIDTH
|
|
24
24
|
? containerWidth - APPROX_APP_BAR_HEIGHT
|
|
25
|
-
: DEFAULT_DRAWER_WIDTH
|
|
25
|
+
: DEFAULT_DRAWER_WIDTH,
|
|
26
|
+
0
|
|
27
|
+
);
|
|
26
28
|
|
|
27
29
|
const width = customWidth ?? defaultWidth;
|
|
28
30
|
|
|
@@ -4,7 +4,7 @@ import type { SharedValue } from 'react-native-reanimated';
|
|
|
4
4
|
import { DrawerProgressContext } from './DrawerProgressContext';
|
|
5
5
|
|
|
6
6
|
export function useDrawerProgress(): Readonly<SharedValue<number>> {
|
|
7
|
-
const progress = React.
|
|
7
|
+
const progress = React.use(DrawerProgressContext);
|
|
8
8
|
|
|
9
9
|
if (progress === undefined) {
|
|
10
10
|
throw new Error(
|