Skip to content

Commit 17deaef

Browse files
authored
Merge pull request #825 from Iterable/loren/embedded/SDK-246-card-component
[SDK-246] card-component
2 parents 9097428 + 9067981 commit 17deaef

8 files changed

Lines changed: 609 additions & 18 deletions

File tree

src/core/assets/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import IterableLogoGrey from './logo-grey.png';
2+
3+
export { IterableLogoGrey };

src/core/assets/logo-grey.png

3.89 KB
Loading

src/embedded/components/IterableEmbeddedCard.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import { StyleSheet } from 'react-native';
2+
3+
export const IMAGE_HEIGHT = 230;
4+
export const PLACEHOLDER_IMAGE_HEIGHT = 56;
5+
export const PLACEHOLDER_IMAGE_WIDTH = 56;
6+
const SHADOW_COLOR_LIGHT = 'rgba(0, 0, 0, 0.06)';
7+
const SHADOW_COLOR_DARK = 'rgba(0, 0, 0, 0.08)';
8+
const IMAGE_BACKGROUND_COLOR = '#F5F4F4';
9+
10+
export const styles = StyleSheet.create({
11+
body: {
12+
alignSelf: 'stretch',
13+
fontSize: 14,
14+
fontWeight: '400',
15+
lineHeight: 20,
16+
},
17+
bodyContainer: {
18+
alignItems: 'flex-start',
19+
alignSelf: 'stretch',
20+
display: 'flex',
21+
flexDirection: 'column',
22+
gap: 24,
23+
paddingBottom: 16,
24+
paddingHorizontal: 16,
25+
paddingTop: 12,
26+
},
27+
button: {
28+
borderRadius: 32,
29+
gap: 8,
30+
},
31+
buttonContainer: {
32+
alignItems: 'flex-start',
33+
alignSelf: 'stretch',
34+
display: 'flex',
35+
flexDirection: 'row',
36+
gap: 12,
37+
width: '100%',
38+
},
39+
buttonText: {
40+
fontSize: 14,
41+
fontWeight: '700',
42+
lineHeight: 20,
43+
},
44+
container: {
45+
alignItems: 'center',
46+
borderStyle: 'solid',
47+
boxShadow:
48+
`0 1px 1px 0 ${SHADOW_COLOR_LIGHT}, 0 0 2px 0 ${SHADOW_COLOR_LIGHT}, 0 0 1px 0 ${SHADOW_COLOR_DARK}`,
49+
display: 'flex',
50+
elevation: 1,
51+
flexDirection: 'column',
52+
gap: 16,
53+
justifyContent: 'center',
54+
overflow: 'hidden',
55+
shadowColor: SHADOW_COLOR_LIGHT,
56+
shadowOffset: { width: 0, height: 1 },
57+
shadowOpacity: 0.9,
58+
shadowRadius: 2,
59+
width: '100%',
60+
},
61+
mediaContainer: {
62+
alignItems: 'flex-start',
63+
alignSelf: 'stretch',
64+
backgroundColor: IMAGE_BACKGROUND_COLOR,
65+
display: 'flex',
66+
flexDirection: 'row',
67+
height: IMAGE_HEIGHT,
68+
},
69+
mediaContainerNoImage: {
70+
alignItems: 'center',
71+
justifyContent: 'center',
72+
},
73+
mediaImage: {
74+
height: IMAGE_HEIGHT,
75+
paddingHorizontal: 0,
76+
paddingVertical: 0,
77+
width: '100%',
78+
},
79+
mediaImagePlaceholder: {
80+
height: PLACEHOLDER_IMAGE_HEIGHT,
81+
opacity: 0.25,
82+
width: PLACEHOLDER_IMAGE_WIDTH,
83+
},
84+
textContainer: {
85+
alignItems: 'flex-start',
86+
alignSelf: 'stretch',
87+
display: 'flex',
88+
flexDirection: 'column',
89+
gap: 8,
90+
},
91+
title: {
92+
fontSize: 18,
93+
fontWeight: '700',
94+
},
95+
});

0 commit comments

Comments
 (0)