From 32cafbff9b6bb697f9516e62f2938a7652b95f12 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 7 Nov 2023 07:20:17 +0800 Subject: [PATCH] chore: add OverflowTip kit component --- web/src/components/CreateTagDialog.tsx | 23 ++++++++++--------- web/src/components/TagList.tsx | 2 +- web/src/components/kit/OverflowTip.tsx | 31 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 11 deletions(-) create mode 100644 web/src/components/kit/OverflowTip.tsx diff --git a/web/src/components/CreateTagDialog.tsx b/web/src/components/CreateTagDialog.tsx index 4667893a..76cc2223 100644 --- a/web/src/components/CreateTagDialog.tsx +++ b/web/src/components/CreateTagDialog.tsx @@ -8,6 +8,7 @@ import { useTagStore } from "@/store/module"; import { useTranslate } from "@/utils/i18n"; import { generateDialog } from "./Dialog"; import Icon from "./Icon"; +import OverflowTip from "./kit/OverflowTip"; type Props = DialogProps; @@ -108,13 +109,14 @@ const CreateTagDialog: React.FC = (props: Props) => { {Array.from(tagNameList) .sort() .map((tag) => ( - handleDeleteTag(tag)} + className="max-w-[120px] text-sm mr-2 mt-1 font-mono cursor-pointer dark:text-gray-300 hover:opacity-60 hover:line-through" > - #{tag} - + handleDeleteTag(tag)}> + #{tag} + + ))} @@ -135,13 +137,14 @@ const CreateTagDialog: React.FC = (props: Props) => { <>
{shownSuggestTagNameList.map((tag) => ( - handleUpsertTag(tag)} + className="max-w-[120px] text-sm mr-2 mt-1 font-mono cursor-pointer dark:text-gray-300 hover:opacity-60" > - #{tag} - + handleUpsertTag(tag)}> + #{tag} + + ))}