Commit 6ff2ba1c authored by zarina's avatar zarina 🌊

изменен интерфейс (добавлен верхний отступ, расширена область клика у кнопки)

parent 72013c72
......@@ -3,7 +3,7 @@ import {StyleSheet, Image, Text, TouchableHighlight, View} from "react-native";
const FullContact = props => {
return (
<View style={{marginTop: 22, flex: 1}}>
<View style={{flex: 1, alignItems: 'center', marginTop: 70}}>
<View>
<Image source={{uri: props.contact.photo}} style={styles.image}/>
<Text style={styles.contactProps}>Name: {props.contact.name}</Text>
......@@ -24,14 +24,14 @@ export default FullContact;
const styles = StyleSheet.create({
image: {
width: 200,
height: 200,
width: 250,
height: 250,
marginRight: 10
},
btn: {
position: 'absolute',
bottom: 0,
padding: 20,
padding: 40,
borderRadius: 5,
backgroundColor: 'rgba(0,0,0,0.7)',
width: '100%'
......
......@@ -26,14 +26,13 @@ class Main extends Component {
render() {
let contacts = [];
for (let contact in this.props.contacts) {
let contactProps = this.props.contacts[contact];
contacts.push(
{
id: contact,
photo: contactProps.photo,
name: contactProps.name,
email: contactProps.email,
phone: contactProps.phone
name: this.props.contacts[contact].name,
photo: this.props.contacts[contact].photo,
email: this.props.contacts[contact].email,
phone: this.props.contacts[contact].phone,
id: contact
})
}
return (
......@@ -67,7 +66,6 @@ class Main extends Component {
}
}
const mapStateToProps = state => {
return {
contacts: state.contacts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment