Skip to content

Commit d803fb1

Browse files
adding icons
Signed-off-by: jackdisalvatore <[email protected]>
1 parent 4aa370e commit d803fb1

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

frontend/src/lib/components/Alert/Alert.svelte

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<script lang="ts">
22
import { Alert, Button } from 'stwui';
3-
// import { informationCircle } from './Svg/solid/informationCircle';
4-
// import { exclamationTriangle } from './Svg/solid/exclamationTriangle';
5-
// import { exclamationCircle } from './Svg/solid/exclamationCircle';
3+
import { informationCircle } from '$lib/components/Svg/solid/informationCircle';
4+
import { exclamationTriangle } from '$lib/components/Svg/solid/exclamationTriangle';
5+
import { exclamationCircle } from '$lib/components/Svg/solid/exclamationCircle';
6+
import { checkCircle } from '$lib/components/Svg/solid/checkCircle';
67
import { ALERT_ANIMATION_DURATION, type AlertType } from '$lib/context/UnityAuthAlertStore';
78
import { createEventDispatcher } from 'svelte';
89
import { fly } from 'svelte/transition';
9-
// import { checkCircle } from './Svg/solid/checkCircle';
1010
1111
const dispatch = createEventDispatcher<{ close: void }>();
1212
13-
// const typeIconMap = {
14-
// error: exclamationCircle,
15-
// info: informationCircle,
16-
// warn: exclamationTriangle,
17-
// success: checkCircle
18-
// };
13+
const typeIconMap = {
14+
error: exclamationCircle,
15+
info: informationCircle,
16+
warn: exclamationTriangle,
17+
success: checkCircle
18+
};
1919
2020
export let type: AlertType;
2121
export let title: string;
@@ -27,8 +27,7 @@
2727
out:fly|global={{ x: 200, duration: ALERT_ANIMATION_DURATION }}
2828
>
2929
<Alert {type} on:fade>
30-
<!-- <Alert.Leading slot="leading" data={typeIconMap[type]} /> -->
31-
<Alert.Leading slot="leading" />
30+
<Alert.Leading slot="leading" data={typeIconMap[type]} />
3231
<Alert.Title slot="title">{title}</Alert.Title>
3332

3433
<Alert.Description slot="description">
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export let checkCircle = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
2+
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" />
3+
</svg>`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export let exclamationCircle = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
2+
<path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" clip-rule="evenodd" />
3+
</svg>`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const exclamationTriangle = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6">
2+
<path fill-rule="evenodd" d="M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" clip-rule="evenodd" />
3+
</svg>`;

frontend/src/lib/components/Svg/solid/informationCircle.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)