-
-
Save amandeepmittal/56aedbaf3117ef55aeed0d1c044895f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { StyleSheet, TouchableOpacity, View, Text } from 'react-native'; | |
import Icon from 'react-native-vector-icons/Feather'; | |
export default function TodoList(props) { | |
return ( | |
<View style={styles.listContainer}> | |
<Icon name="square" size={30} color="black" style={{ marginLeft: 15 }} /> | |
<Text style={styles.listItem}>{props.text}</Text> | |
<Icon | |
name="trash-2" | |
size={30} | |
color="red" | |
style={{ marginLeft: 'auto' }} | |
onPress={props.deleteTodo} | |
/> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
listContainer: { | |
marginTop: '5%', | |
flexDirection: 'row', | |
borderColor: '#aaaaaa', | |
borderBottomWidth: 1.5, | |
width: '100%', | |
alignItems: 'stretch', | |
minHeight: 40 | |
}, | |
listItem: { | |
paddingBottom: 20, | |
paddingLeft: 10, | |
marginTop: 6, | |
borderColor: 'green', | |
borderBottomWidth: 1, | |
fontSize: 17, | |
fontWeight: 'bold', | |
color: 'white' | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment