@macive/ui 0.0.15 → 0.0.16
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.
|
@@ -11,7 +11,7 @@ const Icon_classnames_1 = __importDefault(require("./Icon.classnames"));
|
|
|
11
11
|
const react_1 = require("react");
|
|
12
12
|
const COLORS_WITH_BACKDROPS = ['base', 'critical', 'highlight', 'success', 'warning'];
|
|
13
13
|
function Icon({ source, color, backdrop, accessibilityLabel, size = 20, theme }) {
|
|
14
|
-
var _a;
|
|
14
|
+
var _a, _b;
|
|
15
15
|
let sourceType;
|
|
16
16
|
// Detect source type
|
|
17
17
|
if (source === 'placeholder') {
|
|
@@ -81,7 +81,7 @@ function Icon({ source, color, backdrop, accessibilityLabel, size = 20, theme })
|
|
|
81
81
|
typeof source.svg === 'string'
|
|
82
82
|
? //@ts-expect-error index
|
|
83
83
|
source.svg
|
|
84
|
-
: JSON.stringify(source).replace(/"/g, "'"),
|
|
84
|
+
: (_b = JSON.stringify(source)) === null || _b === void 0 ? void 0 : _b.replace(/"/g, "'"),
|
|
85
85
|
}, "aria-hidden": 'true' })),
|
|
86
86
|
placeholder: (0, jsx_runtime_1.jsx)("div", { className: Icon_classnames_1.default.Placeholder }),
|
|
87
87
|
external: ((0, jsx_runtime_1.jsx)("img", { className: Icon_classnames_1.default.Img, src: `data:image/svg+xml;utf8,${source}`, alt: '', "aria-hidden": 'true' })),
|