diff --git a/components/tooltip/Tooltip.js b/components/tooltip/Tooltip.js index 5f0102ba..3b92b23e 100644 --- a/components/tooltip/Tooltip.js +++ b/components/tooltip/Tooltip.js @@ -193,6 +193,8 @@ const tooltipFactory = (options = {}) => { [theme[positionClass]]: theme[positionClass] }); + const isNative = typeof ComposedComponent === 'string'; + return ( { onClick={this.handleClick} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} - theme={theme} + {...isNative ? {} : {theme}} > {children ? children : null} {visible && ( diff --git a/spec/components/tooltip.js b/spec/components/tooltip.js index 54ef43b4..d2285a07 100644 --- a/spec/components/tooltip.js +++ b/spec/components/tooltip.js @@ -9,6 +9,7 @@ const TooltipStrong = Tooltip(({children, ...other}) => { delete other.theme; return {children}; }); +const TooltipStrongDirect = Tooltip('strong'); const TooltipTest = () => (
@@ -27,9 +28,9 @@ const TooltipTest = () => (

Click this next word to show and hide on click: {' '} - + oh hai - + {' '}. This is useful for mobile!