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.
@@ -55,9 +55,17 @@ export const CDSSnackBar = ({ message, visible, onDismiss, action }) => {
55
55
  }
56
56
  });
57
57
 
58
- const animatedStyle = useAnimatedStyle(() => ({
59
- transform: [{ translateY: translateY.value }],
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: 'fixed',
112
+ position: 'absolute',
105
113
  flexDirection: 'row',
106
114
  alignItems: 'center',
107
115
  justifyContent: 'space-between',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdslibrary",
3
3
  "license": "0BSD",
4
- "version": "1.2.45",
4
+ "version": "1.2.46",
5
5
  "main": "index.js",
6
6
  "author": "Nat Viramontes",
7
7
  "description": "A library of components for the CDS project",