Skip to content

Commit

Permalink
chore: Mv style to rc-util
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Sep 15, 2021
1 parent 0d619be commit 11917aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions components/_util/styleChecker.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
import canUseDom from 'rc-util/lib/Dom/canUseDom';
import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker';

export const canUseDocElement = () => canUseDom() && window.document.documentElement;

export const isStyleSupport = (styleName: string | Array<string>): boolean => {
if (canUseDocElement()) {
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
const { documentElement } = window.document;

return styleNameList.some(name => name in documentElement.style);
}
return false;
};
export { isStyleSupport };

let flexGapSupported: boolean | undefined;
export const detectFlexGapSupported = () => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@
"rc-slider": "~9.7.1",
"rc-steps": "~4.1.0",
"rc-switch": "~3.2.0",
"rc-table": "~7.17.0",
"rc-table": "~7.18.0",
"rc-tabs": "~11.10.0",
"rc-textarea": "~0.3.0",
"rc-tooltip": "~5.1.1",
"rc-tree": "~5.0.1",
"rc-tree-select": "~4.5.0-alpha.0",
"rc-trigger": "^5.2.10",
"rc-upload": "~4.3.0",
"rc-util": "^5.13.1",
"rc-util": "^5.14.0",
"scroll-into-view-if-needed": "^2.2.25"
},
"devDependencies": {
Expand Down

0 comments on commit 11917aa

Please sign in to comment.