@@ -17,7 +17,8 @@ import { parseAria } from "./utils/aria";
17
17
import nodeListToArray from "./utils/nodeListToArray" ;
18
18
19
19
/* CSS */
20
- import cssStyle from "./style" ;
20
+ // import cssStyle from "./style";
21
+ import "./index.scss" ;
21
22
22
23
@staticMethods
23
24
@windowListener
@@ -132,7 +133,7 @@ class ReactTooltip extends React.Component {
132
133
componentDidMount ( ) {
133
134
const { insecure, resizeHide } = this . props ;
134
135
if ( insecure ) {
135
- this . setStyleHeader ( ) ; // Set the style to the <link>
136
+ // this.setStyleHeader(); // Set the style to the <link>
136
137
}
137
138
138
139
this . bindListener ( ) ; // Bind listener for tooltip
@@ -629,20 +630,20 @@ class ReactTooltip extends React.Component {
629
630
* Set style tag in header
630
631
* in this way we can insert default css
631
632
*/
632
- setStyleHeader ( ) {
633
+ /* setStyleHeader() {
633
634
const head = document.getElementsByTagName("head")[0];
634
635
if (!head.querySelector('style[id="react-tooltip"]')) {
635
636
const tag = document.createElement("style");
636
637
tag.id = "react-tooltip";
637
- tag . innerHTML = cssStyle ;
638
- /* eslint-disable */
639
- if ( typeof __webpack_nonce__ !== 'undefined' && __webpack_nonce__ ) {
638
+ tag.innerHTML = cssStyle; */
639
+ /* eslint-disable */
640
+ /* if (typeof __webpack_nonce__ !== 'undefined' && __webpack_nonce__) {
640
641
tag.setAttribute('nonce', __webpack_nonce__)
641
- }
642
+ }*/
642
643
/* eslint-enable */
643
- head . insertBefore ( tag , head . firstChild ) ;
644
+ /* head.insertBefore(tag, head.firstChild);
644
645
}
645
- }
646
+ } */
646
647
647
648
/**
648
649
* CLear all kinds of timeout of interval
@@ -658,13 +659,14 @@ class ReactTooltip extends React.Component {
658
659
const { extraClass, html, ariaProps, disable } = this . state ;
659
660
const placeholder = this . getTooltipContent ( ) ;
660
661
const isEmptyTip = this . isEmptyTip ( placeholder ) ;
661
- const tooltipClass = "__react_component_tooltip" +
662
- ( ( this . state . show && ! disable && ! isEmptyTip ) ? " show" : "" ) +
663
- ( this . state . border ?" border" :"" ) +
664
- ` place-${ this . state . place } ` + // top, bottom, left, right
665
- ` type-${ this . state . type } ` + // dark, success, warning, error, info, light
666
- ( this . props . delayUpdate ?" allow_hover" :"" ) +
667
- ( this . props . clickable ?" allow_click" :"" )
662
+ const tooltipClass =
663
+ "__react_component_tooltip" +
664
+ ( this . state . show && ! disable && ! isEmptyTip ? " show" : "" ) +
665
+ ( this . state . border ? " border" : "" ) +
666
+ ` place-${ this . state . place } ` + // top, bottom, left, right
667
+ ` type-${ this . state . type } ` + // dark, success, warning, error, info, light
668
+ ( this . props . delayUpdate ? " allow_hover" : "" ) +
669
+ ( this . props . clickable ? " allow_click" : "" ) ;
668
670
669
671
let Wrapper = this . props . wrapper ;
670
672
if ( ReactTooltip . supportedWrappers . indexOf ( Wrapper ) < 0 ) {
@@ -701,5 +703,4 @@ class ReactTooltip extends React.Component {
701
703
}
702
704
}
703
705
704
- /* export default not fit for standalone, it will exports {default:...} */
705
706
export default ReactTooltip ;
0 commit comments