@rainlanguage/ui-components 0.0.1-alpha.108 → 0.0.1-alpha.109
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.
|
@@ -21,7 +21,10 @@ const { removeToast } = useToasts();
|
|
|
21
21
|
<CloseCircleSolid class="h-5 w-5" data-testid="error-icon" />
|
|
22
22
|
{/if}
|
|
23
23
|
</svelte:fragment>
|
|
24
|
-
<p>{toast.message}</p>
|
|
24
|
+
<p class="font-semibold">{toast.message}</p>
|
|
25
|
+
{#if toast.detail}
|
|
26
|
+
<p>{toast.detail}</p>
|
|
27
|
+
{/if}
|
|
25
28
|
{#if toast.links}
|
|
26
29
|
<div class="flex flex-col">
|
|
27
30
|
{#each toast.links as { link, label }}
|
|
@@ -12,5 +12,5 @@ export declare function useToasts(): {
|
|
|
12
12
|
toasts: import("svelte/store").Writable<ToastProps[]>;
|
|
13
13
|
addToast: (toast: ToastProps) => void;
|
|
14
14
|
removeToast: (index: number) => void;
|
|
15
|
-
errToast: (message: string) => void;
|
|
15
|
+
errToast: (message: string, detail?: string) => void;
|
|
16
16
|
};
|
|
@@ -44,10 +44,12 @@ export function useToasts() {
|
|
|
44
44
|
* Adds a standardized error toast notification
|
|
45
45
|
*
|
|
46
46
|
* @param message - The error message to display
|
|
47
|
+
* @param detail - The detail of the error
|
|
47
48
|
*/
|
|
48
|
-
const errToast = (message) => {
|
|
49
|
+
const errToast = (message, detail) => {
|
|
49
50
|
addToast({
|
|
50
51
|
message,
|
|
52
|
+
detail,
|
|
51
53
|
type: 'error',
|
|
52
54
|
color: 'red'
|
|
53
55
|
});
|
package/dist/types/toast.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainlanguage/ui-components",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.109",
|
|
4
4
|
"description": "A component library for building Svelte applications to be used with Raindex.",
|
|
5
5
|
"license": "LicenseRef-DCL-1.0",
|
|
6
6
|
"author": "Rain Open Source Software Ltd",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@fontsource/dm-sans": "5.1.0",
|
|
54
54
|
"@imask/svelte": "7.6.1",
|
|
55
55
|
"@observablehq/plot": "0.6.16",
|
|
56
|
-
"@rainlanguage/orderbook": "0.0.1-alpha.
|
|
56
|
+
"@rainlanguage/orderbook": "0.0.1-alpha.109",
|
|
57
57
|
"@reown/appkit": "1.6.4",
|
|
58
58
|
"@reown/appkit-adapter-wagmi": "1.6.4",
|
|
59
59
|
"@sentry/sveltekit": "7.120.0",
|