@symbo.ls/icon 2.10.158 → 2.10.162

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/index.js +9 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ import { isObject } from '@domql/utils'
3
4
  import { Flex, Svg } from '@symbo.ls/atoms'
4
5
 
5
6
  export const Icon = {
@@ -16,8 +17,13 @@ export const Icon = {
16
17
  if (props.active) {
17
18
  activeIconName = props['.active'].name || props['.active'].icon
18
19
  }
19
- if (parent && parent.props &&
20
- parent.props.active && parent.props['.active'] && parent.props['.active'].icon) {
20
+ if (
21
+ parent &&
22
+ parent.props &&
23
+ parent.props.active &&
24
+ parent.props['.active'] &&
25
+ parent.props['.active'].icon
26
+ ) {
21
27
  activeIconName = parent.props['.active'].icon.name || parent.props['.active'].icon.icon || parent.props['.active'].icon
22
28
  }
23
29
 
@@ -25,7 +31,7 @@ export const Icon = {
25
31
  if (ICONS[activeIconName]) validIconName = activeIconName
26
32
  if (ICONS[camelCase]) validIconName = camelCase
27
33
  else if (ICONS[isArray[0] + isArray[1]]) validIconName = isArray[0] + isArray[1]
28
- else if (ICONS[isArray[0]]) validIconName = isArray[0]
34
+ else if (ICONS[isArray[0]]) validIconsName = isArray[0]
29
35
  else {
30
36
  if (verbose) console.warn(`can't find icon:`, iconName, validIconName)
31
37
  validIconName = 'noIcon'
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/icon",
3
- "version": "2.10.158",
3
+ "version": "2.10.162",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "3a847545c01796c874758c2c2a91e2417bcd29d6",
6
+ "gitHead": "bcb75a861d22f204893bc7f58a4432b1126f8e17",
7
7
  "dependencies": {
8
8
  "@symbo.ls/svg": "latest",
9
9
  "@symbo.ls/utils": "latest"