Skip to content

Commit

Permalink
#3 - Post
Browse files Browse the repository at this point in the history
  • Loading branch information
wcaquino committed Jan 7, 2022
1 parent 1064224 commit f3e598e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 2022/InstaClone/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import React from 'react';
import { View } from 'react-native'
import Header from './src/componentes/Header';
import Post from './src/componentes/Post';

export default props => <Header/>
export default props =>
<View style={{flex: 1}}>
<Header/>
<Post image={require('./assets/imgs/fence.jpg')}/>
</View>
18 changes: 18 additions & 0 deletions 2022/InstaClone/src/componentes/Post.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import { View, Image, StyleSheet, Dimensions } from 'react-native'

export default props =>
<View style={styles.container}>
<Image source={props.image} style={styles.image}/>
</View>

const styles = StyleSheet.create({
container: {
flex: 1
},
image: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').width * 3 / 4,
resizeMode: 'contain'
}
})

0 comments on commit f3e598e

Please sign in to comment.