@carrier-dpx/air-react-library 0.7.43 → 0.7.44
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
|
@@ -166,6 +166,7 @@ export const iconRegistry: Record<string, IconInfo> = {
|
|
|
166
166
|
* Get an icon component by name
|
|
167
167
|
*/
|
|
168
168
|
export const getIcon = (name: string): IconInfo | undefined => {
|
|
169
|
+
if (!name) return undefined;
|
|
169
170
|
return iconRegistry[name.toLowerCase()];
|
|
170
171
|
};
|
|
171
172
|
|
|
@@ -5,6 +5,10 @@ import { SimplePaletteColorOptions } from "@mui/material/styles/createPalette";
|
|
|
5
5
|
import { Severity } from "./types";
|
|
6
6
|
|
|
7
7
|
export const getColorInner = (theme: Theme, severity: Severity): string => {
|
|
8
|
+
if (!severity) {
|
|
9
|
+
return theme.palette.base?.state?.disabledContent ||
|
|
10
|
+
lighten(theme.palette.common.black, 0.7);
|
|
11
|
+
}
|
|
8
12
|
const key = severity.toLowerCase() as keyof PaletteOptions;
|
|
9
13
|
const palette = theme.palette[key] as SimplePaletteColorOptions;
|
|
10
14
|
const finalColor =
|
|
@@ -18,6 +22,10 @@ export const getColorInner = (theme: Theme, severity: Severity): string => {
|
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
export const getColorOuter = (theme: Theme, severity: Severity): string => {
|
|
25
|
+
if (!severity) {
|
|
26
|
+
return theme.palette.base?.state?.disabledContent ||
|
|
27
|
+
lighten(theme.palette.common.black, 0.8);
|
|
28
|
+
}
|
|
21
29
|
const key = severity.toLowerCase() as keyof PaletteOptions;
|
|
22
30
|
const palette = theme.palette[key] as SimplePaletteColorOptions;
|
|
23
31
|
const finalColor =
|