From 4de9c745c8dedef6ed6a7da98b98446265926cda Mon Sep 17 00:00:00 2001 From: shrouxm Date: Tue, 19 Nov 2024 12:23:44 -0800 Subject: [PATCH 1/2] feat: tooltip component design updates --- dev-client/src/components/tooltips/Tooltip.tsx | 17 ++++++++--------- .../components/CreateSiteForm.tsx | 4 +--- dev-client/src/theme.ts | 6 ++++++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dev-client/src/components/tooltips/Tooltip.tsx b/dev-client/src/components/tooltips/Tooltip.tsx index 561168d1a..f66c1e38f 100644 --- a/dev-client/src/components/tooltips/Tooltip.tsx +++ b/dev-client/src/components/tooltips/Tooltip.tsx @@ -19,6 +19,8 @@ import {memo} from 'react'; import {IPopoverProps, Popover} from 'native-base'; +import {Text} from 'terraso-mobile-client/components/NativeBaseAdapters'; + type TooltipProps = React.PropsWithChildren<{ trigger: IPopoverProps['trigger']; }>; @@ -26,15 +28,12 @@ type TooltipProps = React.PropsWithChildren<{ export const Tooltip = memo(({trigger, children}: TooltipProps) => { return ( - - - - {children} + + + + + {children} + diff --git a/dev-client/src/screens/CreateSiteScreen/components/CreateSiteForm.tsx b/dev-client/src/screens/CreateSiteScreen/components/CreateSiteForm.tsx index c8d55f353..2c1f2dfa7 100644 --- a/dev-client/src/screens/CreateSiteScreen/components/CreateSiteForm.tsx +++ b/dev-client/src/screens/CreateSiteScreen/components/CreateSiteForm.tsx @@ -108,9 +108,7 @@ export const CreateSiteForm = ({ {t('site.create.add_to_project_label')} - - {t('site.create.add_to_project_tooltip')} - + {t('site.create.add_to_project_tooltip')} Date: Wed, 20 Nov 2024 10:22:31 -0800 Subject: [PATCH 2/2] style nit: add margin and max width --- dev-client/src/components/tooltips/Tooltip.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev-client/src/components/tooltips/Tooltip.tsx b/dev-client/src/components/tooltips/Tooltip.tsx index f66c1e38f..5c8d0ed36 100644 --- a/dev-client/src/components/tooltips/Tooltip.tsx +++ b/dev-client/src/components/tooltips/Tooltip.tsx @@ -28,7 +28,11 @@ type TooltipProps = React.PropsWithChildren<{ export const Tooltip = memo(({trigger, children}: TooltipProps) => { return ( - +