From 4c59088e71cd7c73179cd17bd0e846936363da97 Mon Sep 17 00:00:00 2001 From: Tharun T Date: Mon, 1 Jul 2024 18:15:36 +0530 Subject: [PATCH] feat: Migrate infoTooltip from cloud Signed-off-by: Tharun T --- src/custom/CustomTooltip/customTooltip.tsx | 1 + src/custom/CustomTooltip/index.tsx | 3 ++- src/custom/CustomTooltip/infoTooltip.tsx | 28 ++++++++++++++++++++++ src/custom/index.tsx | 3 ++- 4 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/custom/CustomTooltip/infoTooltip.tsx diff --git a/src/custom/CustomTooltip/customTooltip.tsx b/src/custom/CustomTooltip/customTooltip.tsx index 1c32c5fa..56f50a60 100644 --- a/src/custom/CustomTooltip/customTooltip.tsx +++ b/src/custom/CustomTooltip/customTooltip.tsx @@ -56,3 +56,4 @@ function CustomTooltip({ } export default CustomTooltip; +export type { CustomTooltipProps }; diff --git a/src/custom/CustomTooltip/index.tsx b/src/custom/CustomTooltip/index.tsx index b58ec70a..8542b31a 100644 --- a/src/custom/CustomTooltip/index.tsx +++ b/src/custom/CustomTooltip/index.tsx @@ -1,3 +1,4 @@ import CustomTooltip from './customTooltip'; +import InfoTooltip from './infoTooltip'; -export { CustomTooltip }; +export { CustomTooltip, InfoTooltip }; diff --git a/src/custom/CustomTooltip/infoTooltip.tsx b/src/custom/CustomTooltip/infoTooltip.tsx new file mode 100644 index 00000000..e7376d2c --- /dev/null +++ b/src/custom/CustomTooltip/infoTooltip.tsx @@ -0,0 +1,28 @@ +import { iconSmall } from '../../constants/iconsSizes'; +import InfoOutlinedIcon from '../../icons/InfoOutlined/InfoOutlined'; +import CustomTooltip, { CustomTooltipProps } from './customTooltip'; + +type InfoTooltipProps = { + helpText: string | React.ReactNode | JSX.Element; + style?: React.CSSProperties; +} & Omit; + +const InfoTooltip = ({ helpText, style = {}, ...props }: InfoTooltipProps) => { + return ( + +
+ +
+
+ ); +}; + +export default InfoTooltip; diff --git a/src/custom/index.tsx b/src/custom/index.tsx index 169814b3..974a21b9 100644 --- a/src/custom/index.tsx +++ b/src/custom/index.tsx @@ -8,7 +8,7 @@ import { CustomColumnVisibilityControl, CustomColumnVisibilityControlProps } from './CustomColumnVisibilityControl/CustomColumnVisibilityControl'; -import { CustomTooltip } from './CustomTooltip'; +import { CustomTooltip, InfoTooltip } from './CustomTooltip'; import { CustomDialog, StyledDialogActions, @@ -60,6 +60,7 @@ export { Fallback, FeedbackButton, FlipCard, + InfoTooltip, LearningCard, ModalCard, PopperListener,