@momo-kits/foundation 0.92.26-beta.0 → 0.92.26-beta.2
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/Application/BottomSheet.tsx +8 -8
- package/package.json +2 -2
- package/publish.sh +6 -6
|
@@ -19,7 +19,6 @@ import {Icon} from '../Icon';
|
|
|
19
19
|
|
|
20
20
|
const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
21
21
|
const {theme, navigator} = useContext(ApplicationContext);
|
|
22
|
-
const closed = useRef(false);
|
|
23
22
|
const heightDevice = Dimensions.get('screen').height;
|
|
24
23
|
const insets = useSafeAreaInsets();
|
|
25
24
|
const {
|
|
@@ -78,9 +77,6 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
78
77
|
duration: 200,
|
|
79
78
|
}).start();
|
|
80
79
|
return () => {
|
|
81
|
-
if (!closed.current) {
|
|
82
|
-
navigator?.pop();
|
|
83
|
-
}
|
|
84
80
|
props.route.params?.onDismiss?.();
|
|
85
81
|
};
|
|
86
82
|
}, []);
|
|
@@ -92,16 +88,16 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
92
88
|
if (barrierDismissible && !force) {
|
|
93
89
|
return;
|
|
94
90
|
}
|
|
95
|
-
closed.current = true;
|
|
96
91
|
setTimeout(() => {
|
|
97
|
-
navigator?.pop();
|
|
98
92
|
callback?.();
|
|
99
93
|
}, 300);
|
|
100
94
|
Animated.timing(pan, {
|
|
101
95
|
toValue: {x: 0, y: heightDevice},
|
|
102
96
|
useNativeDriver: false,
|
|
103
97
|
duration: 200,
|
|
104
|
-
}).start()
|
|
98
|
+
}).start(() => {
|
|
99
|
+
navigator?.pop();
|
|
100
|
+
});
|
|
105
101
|
};
|
|
106
102
|
|
|
107
103
|
/**
|
|
@@ -168,7 +164,11 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
|
|
|
168
164
|
<Screen
|
|
169
165
|
{...props}
|
|
170
166
|
{...props.route.params}
|
|
171
|
-
// requestClose={
|
|
167
|
+
// requestClose={
|
|
168
|
+
// props.requestClose ??
|
|
169
|
+
// props.route.params?.requestClose ??
|
|
170
|
+
// requestClose
|
|
171
|
+
// }
|
|
172
172
|
/>
|
|
173
173
|
{useBottomInset && (
|
|
174
174
|
<View style={{height: Math.min(insets.bottom, 21)}} />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.92.26-beta.
|
|
3
|
+
"version": "0.92.26-beta.2",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {},
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
},
|
|
44
44
|
"author": "@momo-kits/foundation",
|
|
45
45
|
"license": "ISC"
|
|
46
|
-
}
|
|
46
|
+
}
|
package/publish.sh
CHANGED
|
@@ -7,16 +7,16 @@ rsync -r --exclude=/dist ./* dist
|
|
|
7
7
|
cd dist
|
|
8
8
|
|
|
9
9
|
if [ "$1" == "stable" ]; then
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
11
|
+
npm version patch
|
|
12
12
|
npm publish --tag stable --access=public
|
|
13
13
|
elif [ "$1" == "latest" ]; then
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
npm version $(npm view @momo-kits/foundation@latest version)
|
|
15
|
+
npm version prerelease --preid=rc
|
|
16
16
|
npm publish --tag latest --access=public
|
|
17
17
|
else
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
npm version $(npm view @momo-kits/foundation@beta version)
|
|
19
|
+
npm version prerelease --preid=beta
|
|
20
20
|
npm publish --tag beta --access=public
|
|
21
21
|
fi
|
|
22
22
|
|