Improve some ui visual effects

This commit is contained in:
PrinOrange
2024-01-08 18:18:21 +08:00
parent 8ce080fedd
commit b10ce77b00
8 changed files with 56 additions and 50 deletions

View File

@@ -1,11 +1,13 @@
import Link from "next/link";
import { fontSourceSerifScreenCN } from "@/styles/font";
export const TagBadge = (props: { name: string; size: "sm" | "md"; count?: number }) => {
return (
<Link href={`/tags/${props.name}`} className={`mx-1 my-1 ${props.size === "sm" ? "text-sm" : "text-base"}`}>
<div className="border-2 border-black px-2 hover:border-gray-600 hover:text-gray-600 dark:hover:text-gray-300 dark:border-white dark:text-white dark:hover:border-gray-300">
{`${props.name}${props.count ? ` (${props.count})` : ""}`}
</div>
</Link>
<div
className={`mx-1 my-1 ${fontSourceSerifScreenCN.className} ${
props.size === "sm" ? "text-sm" : "text-base"
} border-2 border-black px-2 dark:border-white dark:text-white`}
>
{`${props.name}${props.count ? ` (${props.count})` : ""}`}
</div>
);
};