@woosmap/ui 4.185.2 → 4.185.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.185.2",
3
+ "version": "4.185.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -1,12 +1,12 @@
1
1
  import React, { Component } from 'react';
2
2
  import cl from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
- import Icons from './Icons';
4
+ import getIcon from './Icons';
5
5
 
6
6
  class Icon extends Component {
7
7
  render() {
8
8
  const { icon, size, className, isFill, isLoad, title, testId } = this.props;
9
- const IconComponent = Object.keys(Icons).includes(icon) ? Icons[icon] : Icons.woosmap;
9
+ const IconComponent = getIcon(icon);
10
10
  const classes = cl('icon', { 'icon--fill': isFill }, { 'icon--load icon--fill': isLoad }, className);
11
11
  return (
12
12
  <IconComponent
@@ -829,4 +829,8 @@ const Icons = {
829
829
  ...MapDemo,
830
830
  };
831
831
 
832
- export default Icons;
832
+ function getIcon(icon) {
833
+ return Object.keys(Icons).includes(icon) ? Icons[icon] : Icons.woosmap;
834
+ }
835
+
836
+ export default { Icons, getIcon };