ripal-ui 1.0.71 → 1.0.73

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.
@@ -8,7 +8,7 @@ interface ToastProps {
8
8
  label?: string;
9
9
  right?: React.ReactNode; // Allows for any valid React node
10
10
  visible?: boolean;
11
- setVisible: (visible: boolean) => void;
11
+ onDismiss: () => void;
12
12
  timeout?: number;
13
13
  containerStyle?: ViewStyle; // Style for the container View
14
14
  style?: ViewStyle; // Additional style for the Toast
@@ -19,7 +19,7 @@ const Toast: React.FC<ToastProps> = ({
19
19
  label = "Percakapan berhasil dihapus",
20
20
  right = null,
21
21
  visible = true,
22
- setVisible,
22
+ onDismiss,
23
23
  timeout = 3000,
24
24
  containerStyle,
25
25
  textProps,
@@ -27,12 +27,12 @@ const Toast: React.FC<ToastProps> = ({
27
27
  useEffect(() => {
28
28
  if (visible) {
29
29
  const timer = setTimeout(() => {
30
- setVisible(false);
30
+ onDismiss();
31
31
  }, timeout);
32
32
 
33
33
  return () => clearTimeout(timer);
34
34
  }
35
- }, [visible, setVisible, timeout]);
35
+ }, [visible, onDismiss, timeout]);
36
36
 
37
37
  return visible ? (
38
38
  <View style={{ ...styles.container, ...containerStyle }}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ripal-ui",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "A collection of React elements and components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "react": "18.3.1",
12
- "react-native": "0.76.2",
12
+ "react-native": "0.76.5",
13
13
  "@react-native-async-storage/async-storage": "1.23.1"
14
14
  },
15
15
  "devDependencies": {