From cf0d0cd0284046505bd0183082ad10f8a60b4fd3 Mon Sep 17 00:00:00 2001 From: Liron Abutbul <110838700+ladunjexa@users.noreply.github.com> Date: Fri, 9 Jun 2023 07:23:35 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[enhancement]=20Added=20optional?= =?UTF-8?q?=20title=20functionality=20to=20Tags.astro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/blog/Tags.astro | 42 +++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/src/components/blog/Tags.astro b/src/components/blog/Tags.astro index 122cd91..0990bc3 100644 --- a/src/components/blog/Tags.astro +++ b/src/components/blog/Tags.astro @@ -6,29 +6,35 @@ import type { Post } from '~/types'; export interface Props { tags: Post['tags']; - class?: string; + class?: string; + title?: string | undefined; } -const { tags, class: className = 'text-sm' } = Astro.props; +const { tags, class: className = 'text-sm', title = undefined } = Astro.props; --- { tags && Array.isArray(tags) && ( - + <> + <> + {header !== undefined && {header}} + + + ) }