@symbo.ls/atoms 1.2.16 → 1.2.19
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/Svg.js +7 -7
- package/package.json +2 -2
package/Svg.js
CHANGED
|
@@ -18,22 +18,22 @@ export const Svg = {
|
|
|
18
18
|
const useSVGSymbol = icon => `<use xlink:href="#${icon}" />`
|
|
19
19
|
|
|
20
20
|
if (!useSvgSprite) return props.src
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
const spriteId = props.spriteId
|
|
23
23
|
if (spriteId) return useSVGSymbol(spriteId)
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
const symbolId = Symbol.for(props.src)
|
|
26
26
|
let SVGKey = SVG[symbolId]
|
|
27
27
|
if (SVGKey && SVG[SVGKey]) return useSVGSymbol(SVGKey)
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
SVGKey = SVG[symbolId] = Math.random()
|
|
30
|
-
|
|
31
|
-
svg: { [SVGKey]: props.src }
|
|
30
|
+
init({
|
|
31
|
+
svg: { [SVGKey]: props.src }
|
|
32
32
|
}, null, {
|
|
33
33
|
document: context.document,
|
|
34
34
|
emotion: context.emotion
|
|
35
35
|
})
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
return useSVGSymbol(SVGKey)
|
|
38
38
|
}
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.19",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "e4a8395bb28c9a498ee5de17e8b6dbb38391b0ce",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/utils": "latest",
|
|
9
9
|
"@symbo.ls/create-emotion": "latest",
|