From 6c8023463d0e4ea68be3216c454775fd87d3e370 Mon Sep 17 00:00:00 2001
From: David Fischer <david@konst.fish>
Date: Wed, 14 Feb 2024 20:41:13 +0000
Subject: [PATCH] Add support for image popovers (#854)
---
quartz/components/TagList.tsx | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/quartz/components/TagList.tsx b/quartz/components/TagList.tsx
index b39b199..04a483b 100644
--- a/quartz/components/TagList.tsx
+++ b/quartz/components/TagList.tsx
@@ -1,12 +1,13 @@
import { pathToRoot, slugTag } from "../util/path"
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { classNames } from "../util/lang"
-function TagList({ fileData, displayClass }: QuartzComponentProps) {
+const TagList: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {
const tags = fileData.frontmatter?.tags
const baseDir = pathToRoot(fileData.slug!)
if (tags && tags.length > 0) {
return (
- <ul class={`tags ${displayClass ?? ""}`}>
+ <ul class={classNames(displayClass, "tags")}>
{tags.map((tag) => {
const display = `#${tag}`
const linkDest = baseDir + `/tags/${slugTag(tag)}`
--
Gitblit v1.10.0