diff --git a/maps_dashboards/public/components/tooltip/tooltipClick.tsx b/maps_dashboards/public/components/tooltip/tooltipContainer.tsx similarity index 72% rename from maps_dashboards/public/components/tooltip/tooltipClick.tsx rename to maps_dashboards/public/components/tooltip/tooltipContainer.tsx index 9dd2552a..5d883ed2 100644 --- a/maps_dashboards/public/components/tooltip/tooltipClick.tsx +++ b/maps_dashboards/public/components/tooltip/tooltipContainer.tsx @@ -5,17 +5,16 @@ import React from 'react'; -import { - EuiFlexItem, - EuiFlexGroup, - EuiPanel, - EuiText, - EuiHorizontalRule, -} from '@elastic/eui'; +import { EuiFlexItem, EuiFlexGroup, EuiPanel, EuiText, EuiHorizontalRule } from '@elastic/eui'; import { TooltipHeaderContent } from './tooltipHeaderContent'; import { TooltipTable } from './tooltipTable'; -export function TooltipClick(title: string, features: any[], onClose: Function) { +export function TooltipContainer( + title: string, + features: any[], + isClickEvent: boolean, + onClose: Function +) { const toTableRows = () => { const rows: any[] = []; for (const feature of features) { @@ -38,11 +37,11 @@ export function TooltipClick(title: string, features: any[], onClose: Function) - + - + diff --git a/maps_dashboards/public/components/tooltip/tooltipHeaderContent.tsx b/maps_dashboards/public/components/tooltip/tooltipHeaderContent.tsx index e9cbaf27..9d97993b 100644 --- a/maps_dashboards/public/components/tooltip/tooltipHeaderContent.tsx +++ b/maps_dashboards/public/components/tooltip/tooltipHeaderContent.tsx @@ -9,7 +9,7 @@ import React from 'react'; interface Props { title: string; - close: boolean; + isClickEvent: boolean; onClose: Function; } @@ -23,10 +23,9 @@ const TooltipHeaderContent = (props: Props) => { - {props.close && ( + {props.isClickEvent && (