From 3906b56140b835d0b1f56cf14d8d3d0b181fd454 Mon Sep 17 00:00:00 2001 From: programminglaboratorys Date: Tue, 1 Oct 2024 16:06:42 +0300 Subject: [PATCH] change icon on hover --- src/plugins/statusPresets/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/statusPresets/index.tsx b/src/plugins/statusPresets/index.tsx index f932fde3a..50eca53d1 100644 --- a/src/plugins/statusPresets/index.tsx +++ b/src/plugins/statusPresets/index.tsx @@ -56,8 +56,13 @@ const customStatusSettings = getUserSettingLazy("status", "customStatus"); const ClearStatusButton = () => customStatusSettings?.updateSetting(null)}>; -const RenderStatusMenuItem = ({ status }: { status: DiscordStatus; }) => { +function StatusIcon({ isHovering, status }: { isHovering: boolean; status: DiscordStatus; }) { + return isHovering ? + + : (status.emojiInfo != null ? :
); +} +const RenderStatusMenuItem = ({ status }: { status: DiscordStatus; }) => { const [isHovering, setIsHovering] = useState(false); const handleMouseOver = () => { setIsHovering(true); @@ -82,8 +87,8 @@ const RenderStatusMenuItem = ({ status }: { status: DiscordStatus; }) => { type: Toasts.Type.SUCCESS, id: Toasts.genId() }); - }}>{status.emojiInfo != null ? :
} -
{status.text}
+ }}> +
{status.text}
; }; @@ -102,7 +107,7 @@ const StatusSubMenuComponent = () => { export default definePlugin({ name: "StatusPresets", - description: "Allows you to remember your status and set it later", + description: "Allows you to remember your statuses and set them later", authors: [Devs.Dolfies], settings: settings, dependencies: ["UserSettingsAPI"],