cdslibrary 1.2.45 → 1.2.46
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/components/CDSSnackBar.jsx +12 -4
- package/package.json +1 -1
|
@@ -55,9 +55,17 @@ export const CDSSnackBar = ({ message, visible, onDismiss, action }) => {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
|
|
58
|
-
const animatedStyle = useAnimatedStyle(() =>
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
59
|
+
return {
|
|
60
|
+
transform: [
|
|
61
|
+
{ translateY: translateY.value }
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
translateY.value = withTiming(visible ? 0 : 150, { duration: 400 });
|
|
68
|
+
}, [visible]);
|
|
61
69
|
|
|
62
70
|
if (!visible && translateY.value >= 100) return null;
|
|
63
71
|
|
|
@@ -101,7 +109,7 @@ const styles = StyleSheet.create({
|
|
|
101
109
|
alignSelf: 'center',
|
|
102
110
|
width: '90%',
|
|
103
111
|
maxWidth: 600,
|
|
104
|
-
position: '
|
|
112
|
+
position: 'absolute',
|
|
105
113
|
flexDirection: 'row',
|
|
106
114
|
alignItems: 'center',
|
|
107
115
|
justifyContent: 'space-between',
|