y200subcontrols 0.0.3331 → 0.0.3332
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.
|
@@ -3,7 +3,7 @@ import ModalDialog from "./ModalDialog.svelte";
|
|
|
3
3
|
export let message = "Message goes here";
|
|
4
4
|
export let style = "warning";
|
|
5
5
|
export let okButtonContent = "<span>Ok</span>";
|
|
6
|
-
export let cancelButtonContent = "<span>
|
|
6
|
+
export let cancelButtonContent = "<span>Cancel</span>";
|
|
7
7
|
let dialog;
|
|
8
8
|
export async function showDialog() {
|
|
9
9
|
const okButton = document.getElementById("okButtonDialog");
|
|
@@ -30,7 +30,7 @@ export async function showDialog() {
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<ModalDialog bind:this={dialog} showCloseButton={false} allowSubmit={false}>
|
|
33
|
-
<slot slot="title" >Title goes here</slot>
|
|
33
|
+
<slot slot="title" name="title">Title goes here</slot>
|
|
34
34
|
<div
|
|
35
35
|
class="flex
|
|
36
36
|
{style === 'warning' ? 'text-amber-500' : ''}
|
|
@@ -45,7 +45,22 @@ onMount(() => {
|
|
|
45
45
|
class="px-3 py-1 rounded bg-emerald-500 text-emerald-50"
|
|
46
46
|
on:click={openMenu}
|
|
47
47
|
>
|
|
48
|
-
<
|
|
48
|
+
<svg
|
|
49
|
+
class="w-6 h-6 text-white"
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
+
width="24"
|
|
53
|
+
height="24"
|
|
54
|
+
fill="none"
|
|
55
|
+
viewBox="0 0 24 24"
|
|
56
|
+
>
|
|
57
|
+
<path
|
|
58
|
+
stroke="currentColor"
|
|
59
|
+
stroke-linecap="round"
|
|
60
|
+
stroke-width="3"
|
|
61
|
+
d="M12 6h.01M12 12h.01M12 18h.01"
|
|
62
|
+
/>
|
|
63
|
+
</svg>
|
|
49
64
|
</button>
|
|
50
65
|
{#if true}
|
|
51
66
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
@@ -106,7 +121,11 @@ onMount(() => {
|
|
|
106
121
|
<ConfirmModalDialog
|
|
107
122
|
bind:this={deleteDialog}
|
|
108
123
|
style="danger"
|
|
109
|
-
|
|
124
|
+
okButtonContent="Yes, delete"
|
|
125
|
+
cancelButtonContent="Cancel"
|
|
110
126
|
>
|
|
111
|
-
<span> Confirm Delete </span>
|
|
127
|
+
<span slot="title"> Confirm Delete </span>
|
|
128
|
+
<div class="text-center">
|
|
129
|
+
<span> Are you sure you want to delete this record </span>
|
|
130
|
+
</div>
|
|
112
131
|
</ConfirmModalDialog>
|