Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move styles back to base Card #2589

Merged
merged 1 commit into from Sep 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/card/Card.js
Expand Up @@ -208,6 +208,21 @@ const styles = {
wrapper: {
backgroundColor: 'transparent',
},
imageCardTitle: {
marginTop: 15,
},
overlayContainer: {
flex: 1,
alignItems: 'center',
backgroundColor: 'rgba(0, 0, 0, 0.2)',
alignSelf: 'stretch',
justifyContent: 'center',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
};

export { Card };
Expand Down
15 changes: 0 additions & 15 deletions src/card/CardTitle.js
Expand Up @@ -29,21 +29,6 @@ const styles = {
textAlign: 'center',
marginBottom: 15,
}),
imageCardTitle: {
marginTop: 15,
},
overlayContainer: {
flex: 1,
alignItems: 'center',
backgroundColor: 'rgba(0, 0, 0, 0.2)',
alignSelf: 'stretch',
justifyContent: 'center',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
};

export default withTheme(CardTitle, 'CardTitle');
24 changes: 22 additions & 2 deletions src/card/__tests__/__snapshots__/Card.js.snap
Expand Up @@ -92,6 +92,7 @@ exports[`Card Component should have Card title with image 1`] = `
style={
Object {
"backgroundColor": "red",
"marginTop": 15,
}
}
>
Expand Down Expand Up @@ -192,7 +193,11 @@ exports[`Card Component should have Card with featured title 1`] = `
>
<View>
<Themed.CardTitle
style={Object {}}
style={
Object {
"marginTop": 15,
}
}
>
foo title
</Themed.CardTitle>
Expand All @@ -216,7 +221,22 @@ exports[`Card Component should have Card with featured title 1`] = `
}
}
>
<View>
<View
style={
Object {
"alignItems": "center",
"alignSelf": "stretch",
"backgroundColor": "rgba(0, 0, 0, 0.2)",
"bottom": 0,
"flex": 1,
"justifyContent": "center",
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<Themed.CardFeaturedTitle
style={
Object {
Expand Down
2 changes: 1 addition & 1 deletion src/image/__tests__/__snapshots__/Image.js.snap
Expand Up @@ -314,7 +314,7 @@ exports[`Image Component should render on ios 1`] = `
"top": 0,
},
Object {
"opacity": 1,
"opacity": 0.9999710210009842,
},
]
}
Expand Down