@symbo.ls/atoms 1.2.19 → 1.2.21

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.
Files changed (2) hide show
  1. package/Svg.js +6 -3
  2. package/package.json +2 -2
package/Svg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { init } from '@symbo.ls/init'
3
+ // import { init } from '@symbo.ls/init'
4
4
 
5
5
  // create SVG symbol
6
6
  export const Svg = {
@@ -13,11 +13,14 @@ export const Svg = {
13
13
  'xmlns:xlink': 'http://www.w3.org/1999/xlink'
14
14
  },
15
15
  html: ({ key, props, context, ...el }) => {
16
- const SVG = context.system && context.system.SVG
16
+ const { system, packages } = context
17
+ const SVG = system && system.SVG
17
18
  const useSvgSprite = props.spriteId || (context.system && context.system.useSvgSprite)
18
19
  const useSVGSymbol = icon => `<use xlink:href="#${icon}" />`
19
20
 
20
- if (!useSvgSprite) return props.src
21
+ const init = (packages && packages.init) || require('@symbo.ls/init').init
22
+
23
+ if (!useSvgSprite && props.src) return props.src
21
24
 
22
25
  const spriteId = props.spriteId
23
26
  if (spriteId) return useSVGSymbol(spriteId)
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "e4a8395bb28c9a498ee5de17e8b6dbb38391b0ce",
6
+ "gitHead": "87c6ab26e8cc5beb11f44b66618a63f460884416",
7
7
  "dependencies": {
8
8
  "@domql/utils": "latest",
9
9
  "@symbo.ls/create-emotion": "latest",