-
Notifications
You must be signed in to change notification settings - Fork 0
/
Body.js
33 lines (31 loc) · 800 Bytes
/
Body.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, { Component } from 'react'
import { Text, View, StyleSheet,FlatList, ActivityIndicator } from 'react-native'
import Tarea from './Tarea';
export default class Body extends Component {
render() {
return (
<View style={styles.body}>
{this.props.estado &&
<ActivityIndicator
size="large"
color="#640064"
/>
}
{!this.props.estado &&
<FlatList
data={this.props.datos}
renderItem={({item})=><Tarea eliminar={this.props.eliminar} id={item.key} nombre={item.texto} />}
/>
}
</View>
)
}
}
const styles = StyleSheet.create({
body:{
flex:2,
backgroundColor:'#DAF7A6',
justifyContent:'center',
paddingHorizontal:16
}
})