imbric-theme 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,54 +23,45 @@ export const Icon = ({
23
23
  const icon = iconsMap[name]
24
24
  const mappedSize = mapSize(size)
25
25
 
26
- return (
27
-
28
- !disabled ?
29
- <div
30
- id={id}
31
- className={getStyles(className, 'icon', ['color', 'size', 'background'], {
32
- 'is-clickable': isClickable || !!onClick,
33
- })}
34
- style={{ width: mappedSize, height: mappedSize }
35
- }
36
- onClick={onClick && handleClick({ onClick })}
26
+ return !disabled ? (
27
+ <div
28
+ id={id}
29
+ className={getStyles(className, 'icon', ['color', 'size', 'background'], {
30
+ 'is-clickable': isClickable || !!onClick,
31
+ })}
32
+ style={{ width: mappedSize, height: mappedSize }}
33
+ onClick={onClick && handleClick({ onClick })}
34
+ >
35
+ <svg
36
+ viewBox={icon.viewBox}
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ width={mappedSize}
39
+ height={mappedSize}
37
40
  >
38
- <svg
39
- viewBox={icon.viewBox}
40
- xmlns="http://www.w3.org/2000/svg"
41
- width={mappedSize}
42
- height={mappedSize}
43
- >
44
- {icon.svg}
45
- </svg>
46
- </div >
47
-
48
- :
49
-
50
- <div
51
- id={id}
52
- className={getStyles(className, 'icon', ['color', 'size', 'background'], {
53
- 'is-clickable': isClickable || !!onClick,
41
+ {icon.svg}
42
+ </svg>
43
+ </div>
44
+ ) : (
45
+ <div
46
+ id={id}
47
+ className={getStyles(className, 'icon', ['color', 'size', 'background'], {
48
+ 'is-clickable': isClickable || !!onClick,
49
+ 'is-disabled': disabled,
50
+ })}
51
+ style={{ width: mappedSize, height: mappedSize }}
52
+ >
53
+ <svg
54
+ viewBox={icon.viewBox}
55
+ xmlns="http://www.w3.org/2000/svg"
56
+ width={mappedSize}
57
+ height={mappedSize}
58
+ className={getStyles({
54
59
  'is-disabled': disabled,
55
60
  })}
56
- style={{ width: mappedSize, height: mappedSize }
57
- }
58
61
  >
59
- <svg
60
- viewBox={icon.viewBox}
61
- xmlns="http://www.w3.org/2000/svg"
62
- width={mappedSize}
63
- height={mappedSize}
64
- className={getStyles({
65
- 'is-disabled': disabled,
66
- })}
67
- >
68
- {icon.svg}
69
- </svg>
70
- </div >
71
-
72
-
73
-
62
+ {icon.svg}
63
+ </svg>
64
+ </div>
74
65
  )
75
66
  }
76
67
 
@@ -93,7 +84,7 @@ Icon.defaultProps = {
93
84
  background: 'transparent',
94
85
  isClickable: false,
95
86
  disabled: false,
96
- getStyles: () => { },
87
+ getStyles: () => {},
97
88
  }
98
89
 
99
90
  export default withStyles(styles)(Icon)