@sphereon/ui-components.ssi-react-native 0.2.1-unstable.45 → 0.2.1-unstable.47

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.
@@ -5,10 +5,14 @@ import SSIPlaceholderLogo from '../SSIPlaceholderLogo';
5
5
  const SSILogo = (props) => {
6
6
  const { logo, color = logoColors.default, size = 32, style } = props;
7
7
  const source = { ...logo, priority: FastImage.priority.high };
8
+ const aspectRatio = logo?.dimensions ? calculateAspectRatio(logo.dimensions.width, logo.dimensions.height) : 1;
9
+ const calculatedHeight = size;
10
+ const calculatedWidth = size * aspectRatio;
8
11
  return logo ? (<FastImage style={{
9
12
  ...style,
10
- ...(logo?.dimensions && { aspectRatio: calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height) }),
11
- height: size,
13
+ height: calculatedHeight,
14
+ width: calculatedWidth > size ? size : calculatedWidth,
15
+ maxWidth: size,
12
16
  }} resizeMode={FastImage.resizeMode.contain} source={source}/>) : (<SSIPlaceholderLogo style={style} size={size} color={color}/>);
13
17
  };
14
18
  export default SSILogo;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.ssi-react-native",
3
3
  "private": false,
4
- "version": "0.2.1-unstable.45+65cd0d3",
4
+ "version": "0.2.1-unstable.47+5b23976",
5
5
  "description": "SSI UI components for React-Native",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@react-native-community/blur": "^4.4.0",
32
32
  "@react-native-masked-view/masked-view": "0.3.1",
33
- "@sphereon/ui-components.core": "0.2.1-unstable.45+65cd0d3",
33
+ "@sphereon/ui-components.core": "0.2.1-unstable.47+5b23976",
34
34
  "expo-linear-gradient": "~12.7.2",
35
35
  "react-native-fast-image": "^8.6.3",
36
36
  "react-native-size-matters": "^0.4.0",
@@ -48,5 +48,5 @@
48
48
  "react": ">= 18",
49
49
  "react-native": "~0.73.6"
50
50
  },
51
- "gitHead": "65cd0d3a3f8a4ab252735b40ff74e5106e3b60b0"
51
+ "gitHead": "5b2397677779f1ab13907aee5bda1384bb526120"
52
52
  }