From fb868a58105fa38472e50a5e1298045fbb54113d Mon Sep 17 00:00:00 2001 From: Oleg Silkin Date: Tue, 3 Dec 2019 20:30:29 -0500 Subject: [PATCH] Fixes the styling for custom-wrapped components --- ui/component/uriIndicator/view.jsx | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/ui/component/uriIndicator/view.jsx b/ui/component/uriIndicator/view.jsx index 6458b4afc..3ebc176c5 100644 --- a/ui/component/uriIndicator/view.jsx +++ b/ui/component/uriIndicator/view.jsx @@ -65,18 +65,22 @@ class UriIndicator extends React.PureComponent { return inner; } - const Wrapper = addTooltip - ? ({ children }) => ( - }>{children} - ) - : 'span'; - /* to wrap the UriIndicator element around other DOM nodes as a button */ - const content = children ? children : ({inner}); - return ( - - ); + if (children) { + return ; + } else { + const Wrapper = addTooltip + ? ({ children }) => ( + }> + {children} + + ) + : 'span'; + return ( + + ); + } } else { return null; }