sapo-components-ui-rn 1.1.7 → 1.1.8
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.esm.js +21 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Badge/index.tsx +23 -1
package/dist/index.esm.js
CHANGED
|
@@ -6846,6 +6846,26 @@ var Badge = React__default.memo(function (_a) {
|
|
|
6846
6846
|
return null;
|
|
6847
6847
|
return BADGE_CONFIGS.sizes[badgeSize];
|
|
6848
6848
|
}, [badgeSize]);
|
|
6849
|
+
var getColorProgress = useMemo(function () {
|
|
6850
|
+
var configs = {
|
|
6851
|
+
success: {
|
|
6852
|
+
color: colors.borderSuccessDefault,
|
|
6853
|
+
},
|
|
6854
|
+
error: {
|
|
6855
|
+
color: colors.borderErrorDefault,
|
|
6856
|
+
},
|
|
6857
|
+
info: {
|
|
6858
|
+
color: colors.iconPrimaryDefault,
|
|
6859
|
+
},
|
|
6860
|
+
warning: {
|
|
6861
|
+
color: colors.borderWarningDefault,
|
|
6862
|
+
},
|
|
6863
|
+
default: {
|
|
6864
|
+
color: colors.borderInfoDefault,
|
|
6865
|
+
},
|
|
6866
|
+
};
|
|
6867
|
+
return configs[type];
|
|
6868
|
+
}, [colors, type]);
|
|
6849
6869
|
var typeStyles = useMemo(function () {
|
|
6850
6870
|
var configs = {
|
|
6851
6871
|
success: {
|
|
@@ -6944,7 +6964,7 @@ var Badge = React__default.memo(function (_a) {
|
|
|
6944
6964
|
return (React__default.createElement(View, { row: true },
|
|
6945
6965
|
React__default.createElement(View, { row: true, center: true, borderRadius: 999, borderWidth: CONSTANTS.BORDER_WIDTH_1, style: [sizeStyles, typeStyles, style] },
|
|
6946
6966
|
leftIcon && React__default.createElement(View, { paddingRight: CONSTANTS.SPACE_4 }, leftIcon),
|
|
6947
|
-
progressType !== "none" && (React__default.createElement(ProgressCircle, { progress: progressType, color:
|
|
6967
|
+
progressType !== "none" && (React__default.createElement(ProgressCircle, { progress: progressType, color: getColorProgress.color })),
|
|
6948
6968
|
React__default.createElement(View, { paddingLeft: progressType !== "none" ? CONSTANTS.SPACE_4 : 0 },
|
|
6949
6969
|
React__default.createElement(Text$1, { size: finalTextSize, color: textColor || textColorStyle, style: [styles$8.textMedium, textStyle] }, value)))));
|
|
6950
6970
|
});
|