@apexcura/ui-components 0.0.14-Beta36 → 0.0.14-Beta37

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 CHANGED
@@ -380,10 +380,12 @@ var ButtonElement = (props) => {
380
380
  const [svgContent, setSvgContent] = (0, import_react11.useState)(null);
381
381
  (0, import_react11.useEffect)(() => {
382
382
  if (props.icon) {
383
- fetch(props.icon).then((response) => response.text()).then((data) => setSvgContent(data)).catch((error) => console.error("Error fetching SVG:", error));
383
+ fetch(props.icon).then((response) => response.text()).then((data) => {
384
+ let modifiedData = data.replace(/<svg/g, `<svg class="${props.iconsClassName || ""}"`);
385
+ setSvgContent(modifiedData);
386
+ }).catch((error) => console.error("Error fetching SVG:", error));
384
387
  }
385
388
  }, [props.icon]);
386
- console.log(svgContent);
387
389
  return /* @__PURE__ */ import_react11.default.createElement(
388
390
  "button",
389
391
  {
package/dist/index.mjs CHANGED
@@ -321,10 +321,12 @@ var ButtonElement = (props) => {
321
321
  const [svgContent, setSvgContent] = useState4(null);
322
322
  useEffect(() => {
323
323
  if (props.icon) {
324
- fetch(props.icon).then((response) => response.text()).then((data) => setSvgContent(data)).catch((error) => console.error("Error fetching SVG:", error));
324
+ fetch(props.icon).then((response) => response.text()).then((data) => {
325
+ let modifiedData = data.replace(/<svg/g, `<svg class="${props.iconsClassName || ""}"`);
326
+ setSvgContent(modifiedData);
327
+ }).catch((error) => console.error("Error fetching SVG:", error));
325
328
  }
326
329
  }, [props.icon]);
327
- console.log(svgContent);
328
330
  return /* @__PURE__ */ React11.createElement(
329
331
  "button",
330
332
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta36",
3
+ "version": "0.0.14-Beta37",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",