From 0bda3a543a9259ab6541e21466c878e759a20ddd Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Fri, 21 Oct 2022 11:22:58 +0100 Subject: [PATCH] add types for refactored component --- .../src/lib/components/custom-tooltip.tsx | 23 +++++++++++++++++++ .../helper/src/types/customtooltip.ts | 10 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx create mode 100644 libs/remix-ui/helper/src/types/customtooltip.ts diff --git a/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx b/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx new file mode 100644 index 0000000000..9767d4c9ea --- /dev/null +++ b/libs/remix-ui/helper/src/lib/components/custom-tooltip.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { Fragment } from 'react'; +import { OverlayTrigger, Tooltip } from 'react-bootstrap'; +import { CustomTooltipType } from '../../types/customtooltip' + + +function CustomTooltip({ children, placement, tooltipId, tooltipClasses, tooltipText }: CustomTooltipType) { + + return ( + + + {tooltipText} + + } + > + {children} + + + ) +} \ No newline at end of file diff --git a/libs/remix-ui/helper/src/types/customtooltip.ts b/libs/remix-ui/helper/src/types/customtooltip.ts new file mode 100644 index 0000000000..7af0318dee --- /dev/null +++ b/libs/remix-ui/helper/src/types/customtooltip.ts @@ -0,0 +1,10 @@ +import { ReactNode } from "react" +import { Placement } from "react-bootstrap/esm/Overlay" + +export type CustomTooltipType = { + children: ReactNode, + placement?: Placement, + tooltipId?: string, + tooltipClasses?:string, + tooltipText: string +} \ No newline at end of file