decathlon-ui 0.3.42 → 0.3.43

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.
@@ -1 +1 @@
1
- {"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA8DhD,eAAO,MAAM,KAAK,6FAhDf,UAAU,6CAgDkC,CAAC"}
1
+ {"version":3,"file":"badge.component.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAsEhD,eAAO,MAAM,KAAK,6FAxDf,UAAU,6CAwDkC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Text, View } from "react-native";
3
3
  import React from "react";
4
+ import { SvgUri } from "react-native-svg";
4
5
  import { useBadgeStyles } from "./badge.styles";
5
6
  /**
6
7
  * Badge - Componente para exibição de etiquetas ou marcadores
@@ -12,6 +13,9 @@ const BadgeComponent = ({ text, variant, size = "medium", style, textStyle, icon
12
13
  if (!icon) {
13
14
  return null;
14
15
  }
16
+ if (typeof icon === "string" && icon.includes(".svg")) {
17
+ return (_jsx(View, { style: styles.iconContainer, children: _jsx(SvgUri, { uri: icon, width: 24, height: 24 }) }));
18
+ }
15
19
  return _jsx(View, { style: styles.iconContainer, children: icon });
16
20
  };
17
21
  // Determina os estilos de tamanho do texto com base no parâmetro size
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decathlon-ui",
3
- "version": "0.3.42",
3
+ "version": "0.3.43",
4
4
  "description": "Biblioteca de componentes React Native com Storybook e documentação via GitHub Pages.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",