coolify/apps/ui/src/lib/components/Trend.svelte

40 lines
943 B
Svelte
Raw Normal View History

2022-05-09 12:03:07 +00:00
<script lang="ts">
2022-07-06 09:02:36 +00:00
export let trend: string;
2022-05-09 12:03:07 +00:00
</script>
{#if trend === 'up'}
2022-05-10 08:34:50 +00:00
<span class="-mt-1 inline-flex px-2 text-green-500">
2022-05-09 12:03:07 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="17" y1="7" x2="7" y2="17" />
<polyline points="8 7 17 7 17 16" />
</svg></span
>
{:else if trend === 'down'}
2022-05-10 08:34:50 +00:00
<span class="text-red-500 px-2 inline-flex -mt-1">
2022-05-09 12:03:07 +00:00
<svg
xmlns="http://www.w3.org/2000/svg"
class="w-8 h-8"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<line x1="7" y1="7" x2="17" y2="17" />
<polyline points="17 8 17 17 8 17" />
</svg>
</span>
{/if}