@momo-kits/suggest-action 0.167.1-duotest.1 → 0.167.1
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/SuggestActionView.tsx +1 -10
- package/package.json +1 -1
- package/styles.ts +4 -1
package/SuggestActionView.tsx
CHANGED
|
@@ -5,12 +5,7 @@ import React, {
|
|
|
5
5
|
useImperativeHandle,
|
|
6
6
|
useRef,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import {
|
|
9
|
-
Animated,
|
|
10
|
-
Easing,
|
|
11
|
-
TouchableOpacity,
|
|
12
|
-
useWindowDimensions,
|
|
13
|
-
} from 'react-native';
|
|
8
|
+
import {Animated, Easing, TouchableOpacity} from 'react-native';
|
|
14
9
|
import {SuggestActionProps, SuggestActionRef} from './types';
|
|
15
10
|
import {
|
|
16
11
|
ApplicationContext,
|
|
@@ -18,7 +13,6 @@ import {
|
|
|
18
13
|
Icon,
|
|
19
14
|
Image,
|
|
20
15
|
Shadow,
|
|
21
|
-
Spacing,
|
|
22
16
|
Text,
|
|
23
17
|
} from '@momo-kits/foundation';
|
|
24
18
|
import styles from './styles';
|
|
@@ -41,8 +35,6 @@ const SuggestAction: ForwardRefRenderFunction<
|
|
|
41
35
|
ref
|
|
42
36
|
) => {
|
|
43
37
|
const {theme} = useContext(ApplicationContext);
|
|
44
|
-
// live window width, so the bar follows fold, unfold and rotation
|
|
45
|
-
const {width: windowWidth} = useWindowDimensions();
|
|
46
38
|
const opacity = useRef(new Animated.Value(0)).current;
|
|
47
39
|
|
|
48
40
|
useImperativeHandle(ref, () => ({show}));
|
|
@@ -109,7 +101,6 @@ const SuggestAction: ForwardRefRenderFunction<
|
|
|
109
101
|
backgroundColor: theme.colors.background.surface,
|
|
110
102
|
opacity,
|
|
111
103
|
bottom,
|
|
112
|
-
width: windowWidth - Spacing.M * 2,
|
|
113
104
|
},
|
|
114
105
|
Shadow.Light,
|
|
115
106
|
]}>
|
package/package.json
CHANGED
package/styles.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {StyleSheet} from 'react-native';
|
|
1
|
+
import {Dimensions, StyleSheet} from 'react-native';
|
|
2
2
|
import {Radius, Spacing} from '@momo-kits/foundation';
|
|
3
3
|
|
|
4
|
+
const screenWidth = Dimensions.get('window').width;
|
|
5
|
+
|
|
4
6
|
export default StyleSheet.create({
|
|
5
7
|
image: {
|
|
6
8
|
width: 32,
|
|
@@ -10,6 +12,7 @@ export default StyleSheet.create({
|
|
|
10
12
|
},
|
|
11
13
|
container: {
|
|
12
14
|
flexDirection: 'row',
|
|
15
|
+
width: screenWidth - Spacing.M * 2,
|
|
13
16
|
marginHorizontal: Spacing.M,
|
|
14
17
|
padding: Spacing.M,
|
|
15
18
|
borderRadius: Radius.S,
|