From f2b5945f64dd37cff9cc0468588c36b3992015c2 Mon Sep 17 00:00:00 2001 From: Jorge Vargas Date: Sun, 16 Feb 2025 00:40:05 -0600 Subject: [PATCH] Implement AlbumBox component --- src/components/AlbumBox.astro | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/components/AlbumBox.astro diff --git a/src/components/AlbumBox.astro b/src/components/AlbumBox.astro new file mode 100644 index 0000000..d305d74 --- /dev/null +++ b/src/components/AlbumBox.astro @@ -0,0 +1,44 @@ +--- +import { Image } from 'astro:assets' + +type Props = + | { title: string; href: string; image: string; loading?: false } + | { title?: string; href?: string; image?: string; loading: true } + +const { props } = Astro +const { title, href, image, loading = false } = props +--- + + + { + loading ? ( +
+
+
+ ) : ( + {`${title} + ) + } + + { + loading ? ( +