@apexcura/ui-components 0.0.14-Beta48 → 0.0.14-Beta49
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/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -415,7 +415,7 @@ var ButtonElement = (props) => {
|
|
|
415
415
|
}
|
|
416
416
|
}, [props.icon, props.className]);
|
|
417
417
|
const handleMouseEnter = () => {
|
|
418
|
-
if (
|
|
418
|
+
if (hoverColor && svgContent) {
|
|
419
419
|
const tempDiv = document.createElement("div");
|
|
420
420
|
tempDiv.innerHTML = svgContent;
|
|
421
421
|
const svgElement = tempDiv.querySelector("svg");
|
|
@@ -425,7 +425,7 @@ var ButtonElement = (props) => {
|
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
const handleMouseLeave = () => {
|
|
428
|
-
if (
|
|
428
|
+
if (svgContent) {
|
|
429
429
|
const tempDiv = document.createElement("div");
|
|
430
430
|
tempDiv.innerHTML = svgContent;
|
|
431
431
|
const svgElement = tempDiv.querySelector("svg");
|
|
@@ -442,13 +442,13 @@ var ButtonElement = (props) => {
|
|
|
442
442
|
onMouseEnter: handleMouseEnter,
|
|
443
443
|
onMouseLeave: handleMouseLeave
|
|
444
444
|
},
|
|
445
|
-
svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
445
|
+
props.isSVGStylesOverride ? props.svgContent && /* @__PURE__ */ import_react11.default.createElement(
|
|
446
446
|
"span",
|
|
447
447
|
{
|
|
448
448
|
className: "svg-container",
|
|
449
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
449
|
+
dangerouslySetInnerHTML: { __html: props.svgContent }
|
|
450
450
|
}
|
|
451
|
-
),
|
|
451
|
+
) : /* @__PURE__ */ import_react11.default.createElement("img", { src: props.icon, alt: "" }),
|
|
452
452
|
props.label
|
|
453
453
|
);
|
|
454
454
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -356,7 +356,7 @@ var ButtonElement = (props) => {
|
|
|
356
356
|
}
|
|
357
357
|
}, [props.icon, props.className]);
|
|
358
358
|
const handleMouseEnter = () => {
|
|
359
|
-
if (
|
|
359
|
+
if (hoverColor && svgContent) {
|
|
360
360
|
const tempDiv = document.createElement("div");
|
|
361
361
|
tempDiv.innerHTML = svgContent;
|
|
362
362
|
const svgElement = tempDiv.querySelector("svg");
|
|
@@ -366,7 +366,7 @@ var ButtonElement = (props) => {
|
|
|
366
366
|
}
|
|
367
367
|
};
|
|
368
368
|
const handleMouseLeave = () => {
|
|
369
|
-
if (
|
|
369
|
+
if (svgContent) {
|
|
370
370
|
const tempDiv = document.createElement("div");
|
|
371
371
|
tempDiv.innerHTML = svgContent;
|
|
372
372
|
const svgElement = tempDiv.querySelector("svg");
|
|
@@ -383,13 +383,13 @@ var ButtonElement = (props) => {
|
|
|
383
383
|
onMouseEnter: handleMouseEnter,
|
|
384
384
|
onMouseLeave: handleMouseLeave
|
|
385
385
|
},
|
|
386
|
-
svgContent && /* @__PURE__ */ React11.createElement(
|
|
386
|
+
props.isSVGStylesOverride ? props.svgContent && /* @__PURE__ */ React11.createElement(
|
|
387
387
|
"span",
|
|
388
388
|
{
|
|
389
389
|
className: "svg-container",
|
|
390
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
390
|
+
dangerouslySetInnerHTML: { __html: props.svgContent }
|
|
391
391
|
}
|
|
392
|
-
),
|
|
392
|
+
) : /* @__PURE__ */ React11.createElement("img", { src: props.icon, alt: "" }),
|
|
393
393
|
props.label
|
|
394
394
|
);
|
|
395
395
|
};
|