@sphereon/ui-components.ssi-react-native 0.2.1-unstable.31 → 0.2.1-unstable.33

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.
@@ -2,11 +2,20 @@ import React from 'react';
2
2
  import FastImage from 'react-native-fast-image';
3
3
  import { calculateAspectRatio, logoColors } from '@sphereon/ui-components.core';
4
4
  import SSIPlaceholderLogo from '../SSIPlaceholderLogo';
5
+ const mergeStyles = (style) => {
6
+ if (!style) {
7
+ return {};
8
+ }
9
+ if (Array.isArray(style)) {
10
+ return Object.assign({}, ...style);
11
+ }
12
+ return style;
13
+ };
5
14
  const SSILogo = (props) => {
6
15
  const { logo, color = logoColors.default, size = 32, style } = props;
7
16
  const source = { ...logo, priority: FastImage.priority.high };
8
17
  return logo ? (<FastImage style={{
9
- ...style,
18
+ ...(mergeStyles(style)),
10
19
  ...(logo?.dimensions && { aspectRatio: calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height) }),
11
20
  height: size,
12
21
  }} resizeMode={FastImage.resizeMode.contain} source={source}/>) : (<SSIPlaceholderLogo style={style} size={size} color={color}/>);
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.31+5f7746b",
4
+ "version": "0.2.1-unstable.33+6a447e3",
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.31+5f7746b",
33
+ "@sphereon/ui-components.core": "0.2.1-unstable.33+6a447e3",
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": "5f7746b335cc357bbd00aaa845223cf3702b3d1a"
51
+ "gitHead": "6a447e3231cc1271c7ba3c91e395e14f34889c30"
52
52
  }