-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTask.js
30 lines (26 loc) · 779 Bytes
/
Task.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
import React, { Component } from 'react'
import { Text, View, StyleSheet, TouchableOpacity } from 'react-native'
import { Ionicons } from '@expo/vector-icons';
export default class Task extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>{this.props.item.text}</Text>
<TouchableOpacity onPress={() => {this.props.delTask(this.props.item.key);}}>
<Ionicons name="ios-remove-circle" size={24} color="red" />
</TouchableOpacity>
</View>
)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'space-between',
flexDirection: 'row',
paddingHorizontal: 16
},
text: {
fontSize: 24
}
});