Skip to content

Commit

Permalink
fix(compability): add polyfill and change styles (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
243083df committed May 28, 2021
1 parent 6d702c8 commit b6e9a1c
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 295 deletions.
10 changes: 8 additions & 2 deletions .babelrc
Expand Up @@ -7,7 +7,13 @@
"@babel/plugin-proposal-json-strings"
],
"presets": [
"@babel/preset-env",
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "3.12"
}
],
"@babel/preset-react"
]
}
}
2 changes: 1 addition & 1 deletion bin/transferSass.js
@@ -1,4 +1,4 @@
const sass = require('node-sass');
const sass = require('sass');
const fs = require('fs');
const path = require('path');

Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -89,6 +89,7 @@
"chai-spies": "^1.0.0",
"commitizen": "2.9.6",
"concurrently": "^2.1.0",
"core-js": "^3.12.1",
"cpy-cli": "^3.1.1",
"cz-conventional-changelog": "^3.1.0",
"enzyme": "^2.3.0",
Expand All @@ -114,7 +115,6 @@
"mocha": "^8.1.3",
"mocha-each": "^2.0.1",
"mocha-jsdom": "^2.0.0",
"node-sass": "^4.13.1",
"npm-run-all": "^4.1.5",
"postcss-nested": "^4.2.1",
"postcss-simple-vars": "^5.0.2",
Expand All @@ -132,6 +132,7 @@
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-stylelint": "1.0.0",
"rollup-plugin-url": "^3.0.1",
"sass": "^1.34.0",
"semantic-release": "^17.0.4",
"snazzy": "^2.0.1",
"standard": "^5.2.2",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Expand Up @@ -22,6 +22,9 @@ import { generateUUID } from './utils/uuid';
import baseCss from './index.scss';
import { generateTooltipStyle } from './decorators/styler';

/* Polyfill */
import 'core-js/modules/es.array.find';

@staticMethods
@windowListener
@customEvent
Expand Down Expand Up @@ -191,6 +194,7 @@ class ReactTooltip extends React.Component {
switch (parentNode.constructor.name) {
case 'Document':
case 'HTMLDocument':
case undefined:
domRoot = parentNode.head;
break;
case 'ShadowRoot':
Expand Down

0 comments on commit b6e9a1c

Please sign in to comment.