feat: enhanced error handling ui (#3021)

* feat: better error handling

* better error handling

* try to fix netlify build

* remove new line
This commit is contained in:
Alireza authored and GitHub committed 2022-11-16 20:27:24 -05:00
1 parent 83ea228d86
commit eddd510a35
8 files changed
+73 -39

No files matched your search

+9 -1
View File
@@ -201,6 +201,14 @@ const ICONS = {
'old-stop': oldStop,
};
function addIcon(iconName, iconSVG) {
if (ICONS[iconName]) {
console.warn(`Icon ${iconName} already exists.`);
}
ICONS[iconName] = iconSVG;
}
/**
* Return the matching SVG Icon as a React Component.
* Results in an inlined SVG Element. If there's no match,
@@ -214,4 +222,4 @@ export default function getIcon(key, props) {
return React.createElement(ICONS[key], props);
}
export { getIcon, ICONS };
export { getIcon, ICONS, addIcon };