@towsila/expo-ui-library 4.7.1 → 4.8.0
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/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.31757 10.0673L9.15105 11.9008L12.818 8.23382M19.2352 10.0673C19.2352 15.1303 15.1308 19.2347 10.0678 19.2347C5.00478 19.2347 0.900391 15.1303 0.900391 10.0673C0.900391 5.00429 5.00478 0.899902 10.0678 0.899902C15.1308 0.899902 19.2352 5.00429 19.2352 10.0673Z" stroke-width="1.8" stroke-linecap="round" stroke="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0.900391 9.1499C0.900391 10.7816 1.38424 12.3767 2.29077 13.7334C3.19729 15.0901 4.48576 16.1475 5.99325 16.7719C7.50074 17.3963 9.15954 17.5597 10.7599 17.2414C12.3602 16.9231 13.8302 16.1373 14.984 14.9835C16.1378 13.8298 16.9235 12.3597 17.2419 10.7594C17.5602 9.15905 17.3968 7.50025 16.7724 5.99276C16.148 4.48527 15.0906 3.1968 13.7338 2.29028C12.3771 1.38376 10.7821 0.899902 9.15039 0.899902C6.84401 0.908579 4.63028 1.80852 2.97206 3.41157L0.900391 5.48324M5.48372 5.48324H0.900391V0.899902M9.15039 4.56657V9.1499L12.8171 10.9832" stroke-width="1.8" stroke-linecap="round" stroke="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="ionicon"><path d="M248 64C146.39 64 64 146.39 64 248s82.39 184 184 184 184-82.39 184-184S349.61 64 248 64Z" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32px"/><path d="M220 220h32v116" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32px"/><path d="M208 340h88" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32px"/><path fill="currentColor" d="M248 130a26 26 0 1 0 26 26 26 26 0 0 0-26-26"/></svg>
|
|
@@ -8,8 +8,11 @@ import {
|
|
|
8
8
|
} from "react-native";
|
|
9
9
|
import { useAppTheme } from "../../context/ThemeContext";
|
|
10
10
|
import { Fonts, textSize } from "../../tokens/typography";
|
|
11
|
-
import {CheckMark, Warning, Information,Close } from "@towsila/icons";
|
|
12
11
|
import { useLanguage } from "../..";
|
|
12
|
+
import Close from "../../assets/icons/warning.svg";
|
|
13
|
+
import CheckMark from "../../assets/icons/checkmark.svg";
|
|
14
|
+
import Warning from "../../assets/icons/history.svg";
|
|
15
|
+
import Information from "../../assets/icons/information-circle-outline.svg"
|
|
13
16
|
interface ToastProps {
|
|
14
17
|
visible: boolean;
|
|
15
18
|
message: string;
|
|
@@ -67,27 +70,28 @@ export default function Toast({
|
|
|
67
70
|
}, [visible]);
|
|
68
71
|
|
|
69
72
|
const contentColor = colors.text.primary;
|
|
73
|
+
const iconColor = colors.background.card
|
|
70
74
|
if (!visible) return null;
|
|
71
75
|
const toastStyle = {
|
|
72
76
|
success: {
|
|
73
77
|
background: colors.semantic.success,
|
|
74
78
|
text: contentColor,
|
|
75
|
-
icon: <CheckMark width={20} height={20} color={
|
|
79
|
+
icon: <CheckMark width={20} height={20} color={iconColor} />,
|
|
76
80
|
},
|
|
77
81
|
error: {
|
|
78
82
|
background: colors.semantic.error,
|
|
79
83
|
text:contentColor,
|
|
80
|
-
icon: <Close width={20} height={20} color={
|
|
84
|
+
icon: <Close width={20} height={20} color={iconColor}/>,
|
|
81
85
|
},
|
|
82
86
|
warning: {
|
|
83
87
|
background: colors.semantic.warning,
|
|
84
88
|
text: contentColor,
|
|
85
|
-
icon: <Warning width={20} height={20} color={
|
|
89
|
+
icon: <Warning width={20} height={20} color={iconColor}/>,
|
|
86
90
|
},
|
|
87
91
|
info: {
|
|
88
92
|
background: colors.semantic.border,
|
|
89
93
|
text: contentColor,
|
|
90
|
-
icon: <Information width={20} height={20} color={
|
|
94
|
+
icon: <Information width={20} height={20} color={iconColor}/>,
|
|
91
95
|
},
|
|
92
96
|
}[type];
|
|
93
97
|
return (
|