@ant-design/icons 5.5.2 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +3554 -3517
- package/dist/index.umd.min.js +1 -1
- package/es/components/Context.d.ts +1 -0
- package/es/utils.js +5 -1
- package/lib/components/Context.d.ts +1 -0
- package/lib/utils.js +5 -1
- package/package.json +1 -1
package/es/utils.js
CHANGED
|
@@ -71,11 +71,15 @@ export var iconStyles = "\n.anticon {\n display: inline-flex;\n align-items: c
|
|
|
71
71
|
export var useInsertStyles = function useInsertStyles(eleRef) {
|
|
72
72
|
var _useContext = useContext(IconContext),
|
|
73
73
|
csp = _useContext.csp,
|
|
74
|
-
prefixCls = _useContext.prefixCls
|
|
74
|
+
prefixCls = _useContext.prefixCls,
|
|
75
|
+
layer = _useContext.layer;
|
|
75
76
|
var mergedStyleStr = iconStyles;
|
|
76
77
|
if (prefixCls) {
|
|
77
78
|
mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
|
|
78
79
|
}
|
|
80
|
+
if (layer) {
|
|
81
|
+
mergedStyleStr = "@layer ".concat(layer, " {\n").concat(mergedStyleStr, "\n}");
|
|
82
|
+
}
|
|
79
83
|
useEffect(function () {
|
|
80
84
|
var ele = eleRef.current;
|
|
81
85
|
var shadowRoot = getShadowRoot(ele);
|
package/lib/utils.js
CHANGED
|
@@ -86,11 +86,15 @@ var iconStyles = exports.iconStyles = "\n.anticon {\n display: inline-flex;\n
|
|
|
86
86
|
var useInsertStyles = exports.useInsertStyles = function useInsertStyles(eleRef) {
|
|
87
87
|
var _useContext = (0, _react.useContext)(_Context.default),
|
|
88
88
|
csp = _useContext.csp,
|
|
89
|
-
prefixCls = _useContext.prefixCls
|
|
89
|
+
prefixCls = _useContext.prefixCls,
|
|
90
|
+
layer = _useContext.layer;
|
|
90
91
|
var mergedStyleStr = iconStyles;
|
|
91
92
|
if (prefixCls) {
|
|
92
93
|
mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
|
|
93
94
|
}
|
|
95
|
+
if (layer) {
|
|
96
|
+
mergedStyleStr = "@layer ".concat(layer, " {\n").concat(mergedStyleStr, "\n}");
|
|
97
|
+
}
|
|
94
98
|
(0, _react.useEffect)(function () {
|
|
95
99
|
var ele = eleRef.current;
|
|
96
100
|
var shadowRoot = (0, _shadow.getShadowRoot)(ele);
|