Skip to content

Commit 6767a63

Browse files
committed
prettier
1 parent 12a89b2 commit 6767a63

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

kit/src/lib/Tip.svelte

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,37 @@
22
interface IconData {
33
paths: string[];
44
}
5-
5+
66
export let warning = false;
7-
const color: 'orange' | 'green' = warning ? "orange" : "green";
8-
7+
const color: "orange" | "green" = warning ? "orange" : "green";
8+
99
// Icon paths
1010
const WarningIcon: IconData = {
1111
paths: [
1212
"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
1313
"M12 9v4",
14-
"M12 17h.01"
15-
]
14+
"M12 17h.01",
15+
],
1616
};
17-
17+
1818
const TipIcon: IconData = {
1919
paths: [
2020
"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
2121
"M9 18h6",
22-
"M10 22h4"
23-
]
22+
"M10 22h4",
23+
],
2424
};
25-
25+
2626
const iconPaths = warning ? WarningIcon.paths : TipIcon.paths;
2727
</script>
2828

2929
<div
30-
class="course-tip {color === 'orange' ? 'course-tip-orange' : ''} bg-gradient-to-br dark:bg-gradient-to-r border to-white dark:from-gray-900 dark:to-gray-950 dark:text-gray-400 {color === 'orange' ? 'from-orange-50 border-orange-50 text-orange-700 before:border-orange-500 dark:before:border-orange-800' : 'from-green-50 border-green-50 text-green-700 before:border-green-500 dark:before:border-green-800'}"
30+
class="course-tip {color === 'orange'
31+
? 'course-tip-orange'
32+
: ''} border bg-gradient-to-br to-white dark:bg-gradient-to-r dark:from-gray-900 dark:to-gray-950 dark:text-gray-400 {color ===
33+
'orange'
34+
? 'border-orange-50 from-orange-50 text-orange-700 before:border-orange-500 dark:before:border-orange-800'
35+
: 'border-green-50 from-green-50 text-green-700 before:border-green-500 dark:before:border-green-800'}"
3136
>
3237
<div class="flex items-baseline gap-2">
3338
<svg
@@ -40,13 +45,13 @@
4045
stroke-width="2"
4146
stroke-linecap="round"
4247
stroke-linejoin="round"
43-
class="h-4 w-4 flex-shrink-0 transform translate-y-0.5"
48+
class="h-4 w-4 flex-shrink-0 translate-y-0.5 transform"
4449
>
4550
{#each iconPaths as path}
4651
<path d={path} />
4752
{/each}
4853
</svg>
49-
<div class="flex-1 mt-0.5">
54+
<div class="mt-0.5 flex-1">
5055
<slot />
5156
</div>
5257
</div>

0 commit comments

Comments
 (0)