platform/packages/ui/src/components/Status.svelte
Alexander Platov 8aaef1a72d
Update and clean icons (#787)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
Co-authored-by: Andrey Sobolev <haiodo@users.noreply.github.com>
Co-authored-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
2022-01-12 10:01:54 +01:00

26 lines
706 B
Svelte

<script lang="ts">
import type { Status } from '@anticrm/platform'
import { Severity } from '@anticrm/platform'
import Info from './icons/Info.svelte'
import Label from './Label.svelte'
export let status: Status
</script>
<div class="flex-center overflow-label container {status.severity}">
{#if status.severity !== Severity.OK}
<Info size={'small'}/>
<div class="small-text ml-2 overflow-label"><Label label={status.code} params={status.params}/></div>
{/if}
</div>
<style lang="scss">
.container {
user-select: none;
font-size: 14px;
color: var(--theme-content-color);
&.WARNING { color: yellow; }
&.ERROR { color: var(--system-error-color); }
}
</style>