From 560e07cd09842647d9eb8cca980020326f443df2 Mon Sep 17 00:00:00 2001 From: Manan Arora Date: Wed, 16 Oct 2024 16:27:58 +0530 Subject: [PATCH 1/4] feat: Add TooltipWrapper component for enhanced UI tooltips --- library/src/components/ToolTipWrapper.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 library/src/components/ToolTipWrapper.tsx diff --git a/library/src/components/ToolTipWrapper.tsx b/library/src/components/ToolTipWrapper.tsx new file mode 100644 index 00000000..8ab7091b --- /dev/null +++ b/library/src/components/ToolTipWrapper.tsx @@ -0,0 +1,23 @@ +import React, { ReactNode } from "react"; + +interface TooltipWrapperProps { + children: ReactNode; + description?: string; + className?: string; +} + +export const TooltipWrapper: React.FC = ({ + children, + description, + className, +}) => { + if (!description) { + return <>{children}; + } + + return ( + + {children} + + ); +}; From 873e6419285ca90e4b0aed1550ac2e45d8bc1125 Mon Sep 17 00:00:00 2001 From: Manan Arora Date: Thu, 17 Oct 2024 02:58:55 +0530 Subject: [PATCH 2/4] refactor: remove TooltipWrapper and add title attribute to externalDocs link --- library/src/components/ToolTipWrapper.tsx | 23 ----------------------- library/src/containers/Info/Info.tsx | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 library/src/components/ToolTipWrapper.tsx diff --git a/library/src/components/ToolTipWrapper.tsx b/library/src/components/ToolTipWrapper.tsx deleted file mode 100644 index 8ab7091b..00000000 --- a/library/src/components/ToolTipWrapper.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import React, { ReactNode } from "react"; - -interface TooltipWrapperProps { - children: ReactNode; - description?: string; - className?: string; -} - -export const TooltipWrapper: React.FC = ({ - children, - description, - className, -}) => { - if (!description) { - return <>{children}; - } - - return ( - - {children} - - ); -}; diff --git a/library/src/containers/Info/Info.tsx b/library/src/containers/Info/Info.tsx index 790c78b9..381e0239 100644 --- a/library/src/containers/Info/Info.tsx +++ b/library/src/containers/Info/Info.tsx @@ -77,6 +77,7 @@ export const Info: React.FunctionComponent = () => { {EXTERAL_DOCUMENTATION_TEXT} From b56784ee3ab191443abfff98c5084c9ad819b9e4 Mon Sep 17 00:00:00 2001 From: Manan Arora Date: Thu, 17 Oct 2024 13:55:24 +0530 Subject: [PATCH 3/4] refactor: adjust tooltip to avoid repetition --- library/src/containers/Info/Info.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/containers/Info/Info.tsx b/library/src/containers/Info/Info.tsx index 381e0239..eeb9560c 100644 --- a/library/src/containers/Info/Info.tsx +++ b/library/src/containers/Info/Info.tsx @@ -77,7 +77,7 @@ export const Info: React.FunctionComponent = () => { {EXTERAL_DOCUMENTATION_TEXT} From c91293dd6a7be1c1e188c1189c3f8847a21a3163 Mon Sep 17 00:00:00 2001 From: Manan Arora Date: Thu, 17 Oct 2024 18:36:07 +0530 Subject: [PATCH 4/4] refactor: fixing lint errors --- library/src/containers/Info/Info.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/containers/Info/Info.tsx b/library/src/containers/Info/Info.tsx index eeb9560c..a32eeb26 100644 --- a/library/src/containers/Info/Info.tsx +++ b/library/src/containers/Info/Info.tsx @@ -77,7 +77,7 @@ export const Info: React.FunctionComponent = () => { {EXTERAL_DOCUMENTATION_TEXT}