Fix SnapshotExample in rn-tester

Summary:
Changelog: [General][Fix] Fix SnapshotExample in rn-tester

Before this diff, the <Image> has no height. You can tell because the backgroundColor of <Image> is black but it doesn't show up on this surface.

Reviewed By: RSNara

Differential Revision: D33649085

fbshipit-source-id: 1b0fa0a82bce29923afee000d0828cbd90845abf
This commit is contained in:
Paige Sun
2022-01-19 16:28:40 -08:00
committed by Facebook GitHub Bot
parent c0e489b729
commit 5fa3807c34
@@ -21,7 +21,7 @@ class ScreenshotExample extends React.Component<{...}, $FlowFixMeState> {
render() {
return (
<View>
<View style={style.container}>
<Text onPress={this.takeScreenshot} style={style.button}>
Click to take a screenshot
</Text>
@@ -38,13 +38,15 @@ class ScreenshotExample extends React.Component<{...}, $FlowFixMeState> {
}
const style = StyleSheet.create({
container: {
flex: 1,
},
button: {
marginBottom: 10,
fontWeight: '500',
},
image: {
flex: 1,
height: 300,
resizeMode: 'contain',
backgroundColor: 'black',
},