Skip to content

Commit 7374490

Browse files
committed
Fix the import issues for antd 4.x tests
Signed-off-by: Artyom Vancyan <[email protected]>
1 parent f144a91 commit 7374490

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/legacy/style.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default (cssText: string) => {
2+
const style = document.createElement("style");
3+
style.setAttribute("type", "text/css");
4+
5+
if ((style as any).styleSheet) {
6+
(style as any).styleSheet.cssText = cssText;
7+
} else {
8+
style.appendChild(document.createTextNode(cssText));
9+
}
10+
11+
document.head.appendChild(style);
12+
}

0 commit comments

Comments
 (0)