From c55e5a3995c7e70010ff8d818948e2f382892828 Mon Sep 17 00:00:00 2001 From: Rezak OTMANI <34196038+rezak-otmani@users.noreply.github.com> Date: Tue, 10 Apr 2018 17:33:19 +0200 Subject: [PATCH] fix(TooltipSimple): handle case when the tooltip icon not displaying (#793) * fix(TooltipSimple): handle case when the tooltip icon not displaying, resolves #786 * fix(TooltipSimple): handle case when the tooltip icon not displaying, resolves #786 --- src/components/TooltipSimple/TooltipSimple.js | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/components/TooltipSimple/TooltipSimple.js b/src/components/TooltipSimple/TooltipSimple.js index 90352789fb38..9ef46d2c4e77 100644 --- a/src/components/TooltipSimple/TooltipSimple.js +++ b/src/components/TooltipSimple/TooltipSimple.js @@ -17,18 +17,31 @@ const TooltipSimple = ({ const tooltipWrapperClasses = classNames(`bx--tooltip--simple`, className); return ( -
- {children} -
- {showIcon && ( - - )} -
+
+ {showIcon ? ( +
+ {children} +
+ +
+
+ ) : ( +
+
+ {children} +
+
+ )}
); };