sapo-components-ui-rn 1.1.33 → 1.1.35
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 +13 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Avatar/index.tsx +14 -0
package/dist/index.esm.js
CHANGED
|
@@ -7079,7 +7079,19 @@ var Avatar = function (_a) {
|
|
|
7079
7079
|
return 16;
|
|
7080
7080
|
}
|
|
7081
7081
|
};
|
|
7082
|
-
|
|
7082
|
+
var getLineHeight = function (size) {
|
|
7083
|
+
switch (size) {
|
|
7084
|
+
case 64:
|
|
7085
|
+
return 24;
|
|
7086
|
+
case 48:
|
|
7087
|
+
return 28;
|
|
7088
|
+
case 32:
|
|
7089
|
+
return 24;
|
|
7090
|
+
default:
|
|
7091
|
+
return 24;
|
|
7092
|
+
}
|
|
7093
|
+
};
|
|
7094
|
+
return (React__default.createElement(View, { onPress: onPress, width: size, height: size, borderRadius: size / 2, center: true, backgroundColor: backgroundColor || colors.surfaceSecondaryDefault, style: [styles$3.container, style] }, source ? (React__default.createElement(Image$1, { resizeMode: "cover", source: source, style: [{ width: size, height: size }, imageStyle] })) : (React__default.createElement(Text$1, { size: getSize(size), lineHeight: getLineHeight(size), color: textColor || colors.textSecondary, style: textStyle || { fontWeight: "500" } }, getInitials(name)))));
|
|
7083
7095
|
};
|
|
7084
7096
|
var styles$3 = StyleSheet.create({
|
|
7085
7097
|
container: {
|