todoItem.js 780 Bytes
Newer Older
YoonDongMin's avatar
YoonDongMin committed
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
import React from 'react';
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';

export default function TodoItem({item, pressHandler}) {
    
    return(
        <TouchableOpacity onPress= {() => pressHandler(item.key)}>
            <View style={styles.item}>
                <MaterialIcons name= 'delete' size={18} color= '#333'/>
                <Text style = {styles.item}>{item.text}</Text> 
            </View>
            
            
        </TouchableOpacity>
    )

    }

    const styles = StyleSheet.create({
        item: {
            padding:16,
            marginTop:16,
            borderColor: '#bbb',
            borderWidth : 1,
            borderStyle: 'd',
            borderStyle: 'dashed',
            borderRadius: 10
        }
    })