From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001
From: rxliuli <rxliuli@gmail.com>
Date: Tue, 4 Nov 2025 05:03:50 +0800
Subject: init commit

---
 .../jet/shelf/ProductPageLinkShelf.svelte          | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 src/components/jet/shelf/ProductPageLinkShelf.svelte

(limited to 'src/components/jet/shelf/ProductPageLinkShelf.svelte')

diff --git a/src/components/jet/shelf/ProductPageLinkShelf.svelte b/src/components/jet/shelf/ProductPageLinkShelf.svelte
new file mode 100644
index 0000000..7b41e80
--- /dev/null
+++ b/src/components/jet/shelf/ProductPageLinkShelf.svelte
@@ -0,0 +1,59 @@
+<script lang="ts" context="module">
+    import type { Shelf, ProductPageLink } from '@jet-app/app-store/api/models';
+
+    interface ProductPageLinkShelf extends Shelf {
+        items: ProductPageLink[];
+    }
+
+    export function isProductPageLinkShelf(
+        shelf: Shelf,
+    ): shelf is ProductPageLinkShelf {
+        const { contentType, items } = shelf;
+        return contentType === 'productPageLink' && Array.isArray(items);
+    }
+</script>
+
+<script lang="ts">
+    import ProductPageLinkItem from '~/components/jet/item/ProductPageLinkItem.svelte';
+    import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
+
+    export let shelf: ProductPageLinkShelf;
+</script>
+
+<ShelfWrapper {shelf}>
+    <div class="product-page-link-shelf">
+        {#each shelf.items as item}
+            <li class="product-page-link-item">
+                <ProductPageLinkItem {item} />
+            </li>
+        {/each}
+    </div>
+</ShelfWrapper>
+
+<style lang="scss">
+    $product-page-link-border: 1px solid var(--systemGray4);
+
+    .product-page-link-shelf {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        column-gap: 20px;
+
+        @media (--range-xsmall-down) {
+            flex-direction: column;
+            align-items: flex-start;
+        }
+    }
+
+    @media (--range-xsmall-down) {
+        .product-page-link-item:first-child {
+            border-top: $product-page-link-border;
+        }
+
+        .product-page-link-item {
+            width: 100%;
+            border-bottom: $product-page-link-border;
+            padding: 0 var(--bodyGutter);
+        }
+    }
+</style>
-- 
cgit v1.2.3

