ripal-ui 1.0.73 → 1.0.76
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/elements/Toast.tsx +8 -2
- package/package.json +2 -2
package/elements/Toast.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import config from "../config";
|
|
|
6
6
|
|
|
7
7
|
interface ToastProps {
|
|
8
8
|
label?: string;
|
|
9
|
+
color?: string;
|
|
9
10
|
right?: React.ReactNode; // Allows for any valid React node
|
|
10
11
|
visible?: boolean;
|
|
11
12
|
onDismiss: () => void;
|
|
@@ -19,9 +20,11 @@ const Toast: React.FC<ToastProps> = ({
|
|
|
19
20
|
label = "Percakapan berhasil dihapus",
|
|
20
21
|
right = null,
|
|
21
22
|
visible = true,
|
|
23
|
+
color = config.colors.slate[800],
|
|
22
24
|
onDismiss,
|
|
23
25
|
timeout = 3000,
|
|
24
26
|
containerStyle,
|
|
27
|
+
style,
|
|
25
28
|
textProps,
|
|
26
29
|
}) => {
|
|
27
30
|
useEffect(() => {
|
|
@@ -36,7 +39,11 @@ const Toast: React.FC<ToastProps> = ({
|
|
|
36
39
|
|
|
37
40
|
return visible ? (
|
|
38
41
|
<View style={{ ...styles.container, ...containerStyle }}>
|
|
39
|
-
<Inline style={
|
|
42
|
+
<Inline style={{
|
|
43
|
+
...styles.area,
|
|
44
|
+
backgroundColor: color,
|
|
45
|
+
...style
|
|
46
|
+
}}>
|
|
40
47
|
<Text size={12} style={{ flexGrow: 1 }} color="#fff" {...textProps}>
|
|
41
48
|
{label}
|
|
42
49
|
</Text>
|
|
@@ -55,7 +62,6 @@ const styles = StyleSheet.create({
|
|
|
55
62
|
padding: 20,
|
|
56
63
|
},
|
|
57
64
|
area: {
|
|
58
|
-
backgroundColor: config.colors.slate[800],
|
|
59
65
|
borderRadius: 999,
|
|
60
66
|
padding: 20,
|
|
61
67
|
paddingHorizontal: 30,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ripal-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76",
|
|
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.
|
|
12
|
+
"react-native": "0.76.6",
|
|
13
13
|
"@react-native-async-storage/async-storage": "1.23.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|