blob: 819f621f1fa982172c7aeba4a03509199541afea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<script lang="ts">
import { isFlowAction, type Banner } from '@jet-app/app-store/api/models';
import { isSome } from '@jet/environment';
import LinkWrapper from '~/components/LinkWrapper.svelte';
export let item: Banner;
</script>
<div class="banner">
<p>
{item.message}
{#if isSome(item.action) && isFlowAction(item.action)}
<LinkWrapper action={item.action}>
{item.action.title}
</LinkWrapper>
{/if}
</p>
</div>
<style>
.banner {
background: rgba(var(--keyColor-rgb), 0.07);
padding: 8px 16px;
margin: 0 var(--bodyGutter);
text-align: center;
border-radius: var(--global-border-radius-small);
}
.banner :global(a) {
color: var(--keyColor);
text-decoration: none;
}
.banner :global(a:hover) {
text-decoration: underline;
}
</style>
|