@@ -808,14 +808,18 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
808808 var isEmptyTip = _state4 . isEmptyTip ;
809809
810810 var tooltipClass = ( 0 , _classnames2 . default ) ( '__react_component_tooltip' , { 'show' : this . state . show && ! disable && ! isEmptyTip } , { 'border' : this . state . border } , { 'place-top' : this . state . place === 'top' } , { 'place-bottom' : this . state . place === 'bottom' } , { 'place-left' : this . state . place === 'left' } , { 'place-right' : this . state . place === 'right' } , { 'type-dark' : this . state . type === 'dark' } , { 'type-success' : this . state . type === 'success' } , { 'type-warning' : this . state . type === 'warning' } , { 'type-error' : this . state . type === 'error' } , { 'type-info' : this . state . type === 'info' } , { 'type-light' : this . state . type === 'light' } ) ;
811+
812+ var wrapper = ReactTooltip . supportedWrappers [ this . props . wrapper ] ;
813+ if ( ! wrapper ) wrapper = ReactTooltip . supportedWrappers [ 'div' ] ;
814+
811815 if ( html ) {
812- return _react2 . default . createElement ( 'div ' , _extends ( { className : tooltipClass + ' ' + extraClass
816+ return _react2 . default . createElement ( 'wrapper ' , _extends ( { className : tooltipClass + ' ' + extraClass
813817 } , ariaProps , {
814818 'data-id' : 'tooltip' ,
815819 dangerouslySetInnerHTML : { __html : placeholder } } ) ) ;
816820 } else {
817821 return _react2 . default . createElement (
818- 'div ' ,
822+ 'wrapper ' ,
819823 _extends ( { className : tooltipClass + ' ' + extraClass
820824 } , ariaProps , {
821825 'data-id' : 'tooltip' } ) ,
@@ -849,9 +853,14 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
849853 afterHide : _react . PropTypes . func ,
850854 disable : _react . PropTypes . bool ,
851855 scrollHide : _react . PropTypes . bool ,
852- resizeHide : _react . PropTypes . bool
856+ resizeHide : _react . PropTypes . bool ,
857+ wrapper : _react . PropTypes . string
853858} , _class2 . defaultProps = {
854- resizeHide : true
859+ resizeHide : true ,
860+ wrapper : 'div'
861+ } , _class2 . supportedWrappers = {
862+ 'div' : _react2 . default . DOM . div ,
863+ 'span' : _react2 . default . DOM . span
855864} , _temp ) ) || _class ) || _class ) || _class ) || _class ;
856865
857866/* export default not fit for standalone, it will exports {default:...} */
0 commit comments