diff --git a/console/src/components/UIKit/atoms/Tooltip/Tooltip.js b/console/src/components/UIKit/atoms/Tooltip/Tooltip.ts similarity index 97% rename from console/src/components/UIKit/atoms/Tooltip/Tooltip.js rename to console/src/components/UIKit/atoms/Tooltip/Tooltip.ts index 50cf27053bb38..5e7f0eb54b272 100644 --- a/console/src/components/UIKit/atoms/Tooltip/Tooltip.js +++ b/console/src/components/UIKit/atoms/Tooltip/Tooltip.ts @@ -4,6 +4,5 @@ import { space } from 'styled-system'; export const StyledTooltip = styled.span` display: inline-block; position: relative; - ${space} -`; +`; \ No newline at end of file diff --git a/console/src/components/UIKit/atoms/Tooltip/index.tsx b/console/src/components/UIKit/atoms/Tooltip/index.tsx new file mode 100644 index 0000000000000..c087e811f186d --- /dev/null +++ b/console/src/components/UIKit/atoms/Tooltip/index.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; +import Tooltip from 'react-bootstrap/lib/Tooltip'; +import { StyledTooltip } from './Tooltip'; + +export type ToolTypeGeneratorProps = { + message: string; +}; + +export const tooltipGenerator: React.FC = ({ + message, +}) => { + return {message}; +}; + +export type ToolTipProps = { + message: ToolTypeGeneratorProps; + placement: string; + children: any; +}; + +export const ToolTip: React.FC = props => { + const { message, placement, children } = props; + return ( + + + + ); +}; diff --git a/console/src/declaration.d.ts b/console/src/declaration.d.ts index f5dd5e6c5f293..73bd76c312738 100644 --- a/console/src/declaration.d.ts +++ b/console/src/declaration.d.ts @@ -8,3 +8,4 @@ declare namespace SvgPanZoom { } declare module 'react-bootstrap/lib/Tooltip'; +declare module 'react-bootstrap/lib/OverlayTrigger';