diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-09-25 12:01:37 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-09-25 12:01:37 +0200 |
| commit | 2a9e668dceda855f8302e2ca9f81ebd6f0e7b5c1 (patch) | |
| tree | 13f7a597c2e31210e722388de8aabf0d43ba5326 /apps/kit/src/routes/book/alerts/+page.svelte | |
| parent | 9f65b9e65ead6cc6b8ce5cfcf650b49fe134cd91 (diff) | |
| download | greatoffice-2a9e668dceda855f8302e2ca9f81ebd6f0e7b5c1.tar.xz greatoffice-2a9e668dceda855f8302e2ca9f81ebd6f0e7b5c1.zip | |
feat: Safelist all classes needed for alerts
Diffstat (limited to 'apps/kit/src/routes/book/alerts/+page.svelte')
| -rw-r--r-- | apps/kit/src/routes/book/alerts/+page.svelte | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/apps/kit/src/routes/book/alerts/+page.svelte b/apps/kit/src/routes/book/alerts/+page.svelte new file mode 100644 index 0000000..93b4850 --- /dev/null +++ b/apps/kit/src/routes/book/alerts/+page.svelte @@ -0,0 +1,62 @@ +<script> + import Alert from "$lib/components/alert.svelte"; +</script> + +<h1>Alerts</h1> +<section> + <h2>Info</h2> + <Alert type="info" message="This is message" title="This is title" /> +</section> + +<section> + <h2>Warning</h2> + <Alert type="warning" message="This is message" title="This is title" /> +</section> +<section> + <h2>Error</h2> + <Alert type="error" message="This is message" title="This is title" /> +</section> +<section> + <h2>Success</h2> + <Alert type="success" message="This is message" title="This is title" /> +</section> +<section> + <h2>Actions</h2> + <Alert + type="info" + message="This is message" + title="This is title" + actions={[ + { + id: "confirm", + text: "Yes!", + color: "green", + }, + { + id: "cancel", + text: "No!", + color: "red", + }, + ]} + /> +</section> +<section> + <h2>Right link</h2> + <Alert + on:rightLinkCliked={() => alert("Right link clicked")} + rightLinkText="Link or action" + type="info" + /> +</section> +<section> + <h2>List</h2> + <Alert + title="This is title" + listItems={["Message 1", "Message 2"]} + type="info" + /> +</section> +<section> + <h2>Closeable</h2> + <Alert message="This is message" closeable type="info" /> +</section> |
