blob: dcfde367cd2ce266712330868fbf8c4333f32235 (
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
38
39
40
41
42
43
|
<script lang="ts" context="module">
import type { Shelf, LinkableText } from '@jet-app/app-store/api/models';
interface LinkableTextShelf extends Shelf {
contentType: 'linkableText';
items: [LinkableText];
}
export function isLinkableTextShelf(
shelf: Shelf,
): shelf is LinkableTextShelf {
return (
shelf.contentType === 'linkableText' && Array.isArray(shelf.items)
);
}
</script>
<script lang="ts">
import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
import LinkableTextItem from '~/components/jet/item/LinkableTextItem.svelte';
export let shelf: LinkableTextShelf;
</script>
<ShelfWrapper centered withPaddingTop={true}>
<div class="banner">
<LinkableTextItem item={shelf.items[0]} />
</div>
</ShelfWrapper>
<style>
.banner {
background: rgba(var(--keyColor-rgb), 0.07);
padding: 8px 16px;
text-align: center;
border-radius: var(--global-border-radius-small);
}
.banner :global(a) {
color: var(--keyColor);
}
</style>
|