platform/packages/ui/src/components/internal/Status.svelte
Alexander Platov 8f1f8721c1
Fix status bar color (#7)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
2021-08-06 08:50:43 +02:00

33 lines
677 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="status">
{#if status.severity !== Severity.OK}
<Info size={'small'}/>
{/if}
{#if status.severity !== Severity.OK}
<span><Label label={status.code} params={status.params}/></span>
{/if}
</div>
<style lang="scss">
.status {
display: flex;
justify-content: center;
align-items: center;
font-size: 11px;
user-select: none;
opacity: .5;
span {
margin-left: 8px;
}
}
</style>