@juspay/svelte-ui-components 2.84.1 → 2.85.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.
|
@@ -9,13 +9,20 @@
|
|
|
9
9
|
statusDescription = '',
|
|
10
10
|
buttonProperties,
|
|
11
11
|
classes,
|
|
12
|
-
onbuttonClick
|
|
12
|
+
onbuttonClick,
|
|
13
|
+
icon
|
|
13
14
|
}: StatusProperties = $props();
|
|
14
15
|
</script>
|
|
15
16
|
|
|
16
17
|
<div class="background {classes ?? ''}">
|
|
17
18
|
<div class="order-status">
|
|
18
|
-
<div class="status-image"
|
|
19
|
+
<div class="status-image">
|
|
20
|
+
{#if icon}
|
|
21
|
+
{@render icon()}
|
|
22
|
+
{:else}
|
|
23
|
+
<Img src={statusIcon} alt="status" />
|
|
24
|
+
{/if}
|
|
25
|
+
</div>
|
|
19
26
|
<div class="status-text">{statusText}</div>
|
|
20
27
|
<div class="status-description">
|
|
21
28
|
<!-- eslint-disable-next-line -->
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
1
2
|
import type { ButtonProperties } from '../Button/properties';
|
|
2
3
|
export type StatusProperties = StatusEventProperties & {
|
|
3
|
-
statusIcon
|
|
4
|
+
statusIcon?: string;
|
|
4
5
|
statusText: string;
|
|
5
6
|
statusDescription: string;
|
|
6
7
|
buttonProperties?: ButtonProperties;
|
|
7
8
|
classes?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Custom media rendered instead of the default `statusIcon` image — e.g. a
|
|
11
|
+
* `LottiePlayer` for animated success/failure/in-progress states. Takes
|
|
12
|
+
* priority over `statusIcon` when provided.
|
|
13
|
+
*/
|
|
14
|
+
icon?: Snippet;
|
|
8
15
|
};
|
|
9
16
|
export type StatusEventProperties = {
|
|
10
17
|
onbuttonClick?: () => void;
|