From 6ca00daf790adfb34f61440d9e285d58c89af020 Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 19 Apr 2019 18:27:36 +0200 Subject: [PATCH] fix: introduces FinalIcon --- src/components/Tooltip/Tooltip.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/Tooltip/Tooltip.js b/src/components/Tooltip/Tooltip.js index 4d2dc66a73..a839347bf0 100644 --- a/src/components/Tooltip/Tooltip.js +++ b/src/components/Tooltip/Tooltip.js @@ -481,16 +481,20 @@ class Tooltip extends Component { const iconProperties = { name: iconName, role: null, description: null }; - const finalIcon = IconCustomElement ? ( - - ) : ( - { - this.triggerEl = node; - })} - {...iconProperties} - /> + const FinalIcon = properties => ( +
+ {IconCustomElement ? ( + + ) : ( + { + this.triggerEl = node; + })} + {...iconProperties} + /> + )} +
); return ( @@ -499,9 +503,7 @@ class Tooltip extends Component { {showIcon ? (
{triggerText} -
- {finalIcon} -
+
) : (