From 8daa17334a4039d5f9124baeab18b71427ea6ff5 Mon Sep 17 00:00:00 2001 From: Aslam H Date: Sun, 8 Sep 2024 06:04:37 +0700 Subject: [PATCH] chore: make delete icon color red for bottom bar --- web/components/routes/link/bottom-bar.tsx | 51 +++++++++++++---------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/web/components/routes/link/bottom-bar.tsx b/web/components/routes/link/bottom-bar.tsx index dfc09e7d..151815b9 100644 --- a/web/components/routes/link/bottom-bar.tsx +++ b/web/components/routes/link/bottom-bar.tsx @@ -15,34 +15,36 @@ import { ID } from "jazz-tools" import { globalLinkFormExceptionRefsAtom } from "./partials/form/link-form" import { toast } from "sonner" -interface ToolbarButtonProps { +interface ToolbarButtonProps extends React.ComponentPropsWithoutRef { icon: keyof typeof icons onClick?: (e: React.MouseEvent) => void tooltip?: string } -const ToolbarButton = React.forwardRef(({ icon, onClick, tooltip }, ref) => { - const button = ( - - ) - - if (tooltip) { - return ( - - - {button} - -

{tooltip}

-
-
-
+const ToolbarButton = React.forwardRef( + ({ icon, onClick, tooltip, ...props }, ref) => { + const button = ( + ) - } - return button -}) + if (tooltip) { + return ( + + + {button} + +

{tooltip}

+
+
+
+ ) + } + + return button + } +) ToolbarButton.displayName = "ToolbarButton" @@ -168,7 +170,12 @@ export const LinkBottomBar: React.FC = () => { transition={{ duration: 0.1 }} > setEditId(null)} /> - + )}