@proximus/lavender-pokecard-native 1.2.4-alpha.5 → 1.2.4-alpha.7
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,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AccessibilityProps, ImageResizeMode, ImageSourcePropType, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { type MediaContainerAspectRatio } from '@proximus/lavender-mediacontainer-native';
|
|
3
4
|
export declare const PxCardBackgroundColor: {
|
|
4
5
|
readonly Light: "ColorBackgroundSurfaceLight";
|
|
5
6
|
readonly Default: "ColorBackgroundSurfaceDefault";
|
|
@@ -42,7 +43,7 @@ export interface PxCardContainerProps extends AccessibilityProps {
|
|
|
42
43
|
*/
|
|
43
44
|
artwork?: ImageSourcePropType;
|
|
44
45
|
paddingSize?: 's' | 'm' | 'l';
|
|
45
|
-
aspectRatio?:
|
|
46
|
+
aspectRatio?: MediaContainerAspectRatio;
|
|
46
47
|
hasBorder?: boolean;
|
|
47
48
|
backgroundColor?: PxCardBackgroundColor;
|
|
48
49
|
backgroundImage?: ImageSourcePropType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PxCardContainer.d.ts","sourceRoot":"","sources":["../src/PxCardContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,kBAAkB,EAGlB,eAAe,EACf,mBAAmB,EACnB,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"PxCardContainer.d.ts","sourceRoot":"","sources":["../src/PxCardContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,kBAAkB,EAGlB,eAAe,EACf,mBAAmB,EACnB,SAAS,EAIT,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,0CAA0C,CAAC;AAElD,eAAO,MAAM,qBAAqB;;;;;;;;CAQxB,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,OAAO,qBAAqB,CAAC,CAAC;AAErE,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,GAAG,CAAC,EAAE,mBAAmB,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,WAAW,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IAC9B,WAAW,CAAC,EAAE,yBAAyB,CAAC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,qBAAqB,CAAC;IACxC,eAAe,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBA4L1D"}
|
package/dist/PxCardContainer.js
CHANGED
|
@@ -2,6 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { Image, ImageBackground, StyleSheet, TouchableOpacity, View, } from 'react-native';
|
|
3
3
|
import { useTheme } from '@proximus/lavender-styling-native';
|
|
4
4
|
import { a11y, e2eID } from '@proximus/lavender-common-native';
|
|
5
|
+
import { PxMediaContainer, } from '@proximus/lavender-mediacontainer-native';
|
|
5
6
|
export const PxCardBackgroundColor = {
|
|
6
7
|
Light: 'ColorBackgroundSurfaceLight',
|
|
7
8
|
Default: 'ColorBackgroundSurfaceDefault',
|
|
@@ -70,7 +71,7 @@ export function PxCardContainer(props) {
|
|
|
70
71
|
artworkImage,
|
|
71
72
|
React.createElement(View, { style: styles.artworkContent }, children))) : (children);
|
|
72
73
|
const innerContent = (React.createElement(React.Fragment, null,
|
|
73
|
-
hasTopMedia && (React.createElement(
|
|
74
|
+
hasTopMedia && (React.createElement(PxMediaContainer, { aspectRatio: aspectRatio, testID: testID ? `${testID}-media-wrapper` : undefined }, mediaImage)),
|
|
74
75
|
hasLeftMedia && (React.createElement(View, { style: styles.leftMediaWrapper, ...(testID && e2eID(`${testID}-media-wrapper`)) }, mediaImage)),
|
|
75
76
|
hasMedia ? (React.createElement(View, { style: {
|
|
76
77
|
padding,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-pokecard-native",
|
|
3
|
-
"version": "1.2.4-alpha.
|
|
3
|
+
"version": "1.2.4-alpha.7",
|
|
4
4
|
"description": "Pokecard component",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"@proximus/lavender-button-native": "*",
|
|
12
12
|
"@proximus/lavender-buttonicon-native": "*",
|
|
13
13
|
"@proximus/lavender-common-native": "*",
|
|
14
|
+
"@proximus/lavender-mediacontainer-native": "*",
|
|
14
15
|
"@proximus/lavender-styling-native": "*",
|
|
15
16
|
"@proximus/lavender-texts-native": "*"
|
|
16
17
|
},
|