From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- code/app/src/lib/components/alert.svelte | 268 +++++++++++++++++++++++++++++++ 1 file changed, 268 insertions(+) create mode 100644 code/app/src/lib/components/alert.svelte (limited to 'code/app/src/lib/components/alert.svelte') diff --git a/code/app/src/lib/components/alert.svelte b/code/app/src/lib/components/alert.svelte new file mode 100644 index 0000000..fd57105 --- /dev/null +++ b/code/app/src/lib/components/alert.svelte @@ -0,0 +1,268 @@ + + +{#if visible} +
+
+
+ +
+
+ {#if !rightLinkText} + {#if title} +

+ {title} +

+ {/if} + {#if message} +
+

+ {@html message} +

+
+ {/if} + {#if listItems?.length ?? 0} +
    + {#each listItems as listItem} +
  • {listItem}
  • + {/each} +
+ {/if} + {:else} +
+
+ {#if title} +

+ {title} +

+ {/if} + {#if message} +
+

+ {@html message} +

+
+ {/if} + {#if listItems?.length ?? 0} +
    + {#each listItems as listItem} +
  • {listItem}
  • + {/each} +
+ {/if} +
+

+ rightLinkClicked()} + class="whitespace-nowrap font-medium text-{colorClassPart}-700 hover:text-{colorClassPart}-600" + > + {rightLinkText} + + +

+
+ {/if} + {#if actions?.length ?? 0} +
+
+ {#each actions as action} + {@const color = action?.color ?? colorClassPart} + + {/each} +
+
+ {/if} +
+ {#if closeable} +
+
+ +
+
+ {/if} +
+
+{/if} -- cgit v1.3