blob: 34426cf1a495745a8413924bd162c9aedfe4aadf (
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
|
<script lang="ts" context="module">
import type { Brick, Shelf } from '@jet-app/app-store/api/models';
interface SmallBrickShelf extends Shelf {
items: Brick[];
}
export function isSmallBrickShelf(shelf: Shelf): shelf is SmallBrickShelf {
const { contentType, items } = shelf;
return contentType === 'smallBrick' && Array.isArray(items);
}
</script>
<script lang="ts">
import ShelfItemLayout from '~/components/ShelfItemLayout.svelte';
import BrickItem from '~/components/jet/item/BrickItem.svelte';
import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
export let shelf: SmallBrickShelf;
</script>
<ShelfWrapper {shelf}>
<ShelfItemLayout {shelf} gridType="C" let:item>
<BrickItem {item} shouldOverlayDescription />
</ShelfItemLayout>
</ShelfWrapper>
|