MapComplete/src/UI/Studio/ShowConversionMessage.svelte

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
920 B
Svelte
Raw Normal View History

<script lang="ts">
2023-11-09 16:30:26 +01:00
import type { ConversionMessage } from "../../Models/ThemeConfig/Conversion/Conversion"
import { ExclamationIcon, InformationCircleIcon } from "@rgossiaux/svelte-heroicons/solid"
/**
* Single conversion message, styled depending on the type
*/
2023-11-09 16:30:26 +01:00
export let message: ConversionMessage
</script>
{#if message.level === "error"}
2023-11-09 16:30:26 +01:00
<div class="alert flex items-center justify-between">
<ExclamationIcon class="mx-1 h-6 w-6 shrink-0" />
{message.message}
2023-11-09 16:30:26 +01:00
<div />
</div>
{:else if message.level === "warning"}
2023-11-09 16:30:26 +01:00
<div class="warning flex items-center justify-between">
<ExclamationIcon class="mx-1 h-6 w-6 shrink-0" />
{message.message}
2023-11-09 16:30:26 +01:00
<div />
</div>
{:else if message.level === "information"}
2023-11-09 16:30:26 +01:00
<div class="information flex items-center justify-between">
<InformationCircleIcon class="mx-1 h-6 w-6 shrink-0" />
{message.message}
2023-11-09 16:30:26 +01:00
<div />
</div>
{/if}