From f5f863f9d2b9bbfebc57c6c850e8c315047398bc Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Sun, 4 Jan 2026 20:43:46 +0700 Subject: [PATCH] fix: improve Tag component by making it entire component clickable (#598) Update Tag component structure/styles and make the entire component clickable --- src/components/Tag.astro | 27 +++++++++++++-------------- src/layouts/PostDetails.astro | 8 ++++---- src/pages/tags/index.astro | 4 ++-- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/components/Tag.astro b/src/components/Tag.astro index 28578b2..aac1816 100644 --- a/src/components/Tag.astro +++ b/src/components/Tag.astro @@ -1,36 +1,35 @@ --- import IconHash from "@/assets/icons/IconHash.svg"; -export interface Props { +type Props = { tag: string; tagName: string; size?: "sm" | "lg"; -} +}; -const { tag, tagName, size = "sm" } = Astro.props; +const { tag, tagName, size = "lg" } = Astro.props; --- -
  • +
  • -  {tagName} + {tagName}
  • diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index aa3929d..6854cf6 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -15,10 +15,10 @@ import IconChevronLeft from "@/assets/icons/IconChevronLeft.svg"; import IconChevronRight from "@/assets/icons/IconChevronRight.svg"; import { SITE } from "@/config"; -export interface Props { +type Props = { post: CollectionEntry<"blog">; posts: CollectionEntry<"blog">[]; -} +}; const { post, posts } = Astro.props; @@ -118,8 +118,8 @@ const nextPost = -