summaryrefslogtreecommitdiff
path: root/src/components/jet/shelf/PrivacyFooterShelf.svelte
blob: dccade667d3b29636edefb657a136cb5ab35b377 (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
<script lang="ts" context="module">
    import type { PrivacyFooter, Shelf } from '@jet-app/app-store/api/models';

    interface PrivacyFooterShelf extends Shelf {
        items: [PrivacyFooter];
    }

    export function isPrivacyFooterShelf(
        shelf: Shelf,
    ): shelf is PrivacyFooterShelf {
        let { contentType, items } = shelf;

        return contentType === 'privacyFooter' && Array.isArray(items);
    }
</script>

<script lang="ts">
    import LinkableTextItem from '~/components/jet/item/LinkableTextItem.svelte';
    import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';

    export let shelf: PrivacyFooterShelf;

    $: bodyText = shelf.items[0].bodyText;
</script>

<ShelfWrapper {shelf} centered>
    <p>
        <LinkableTextItem item={bodyText} />
    </p>
</ShelfWrapper>

<style>
    p {
        font: var(--body-tall);
    }

    p :global(a) {
        color: var(--keyColor);
    }
</style>