Last active
January 6, 2019 09:33
-
-
Save Yassir4/916a641600f62ca5161cfed96b13f9fc 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 { View, TouchableOpacity, Text, StyleSheet } from 'react-native' | |
import Icon from 'react-native-vector-icons/Feather'; | |
const Task = (props) => ( | |
<View style={styles.taskWrapper}> | |
<Icon | |
name="square" | |
size={30} | |
color="#900" | |
style={{ marginLeft: 15 }} | |
/> | |
<Text style={styles.task}>{props.text}</Text> | |
<Icon | |
name="trash-2" | |
size={30} | |
color="#900" | |
style={{ marginLeft: 'auto' }} | |
onPress={props.delete} | |
/> | |
</View> | |
) | |
export default Task | |
const styles = StyleSheet.create({ | |
taskWrapper: { | |
marginTop: '5%', | |
flexDirection: 'row', | |
borderColor: '#FFFFFF', | |
borderBottomWidth: 1.5, | |
width: '100%', | |
alignItems: 'stretch', | |
minHeight: 40, | |
}, | |
task: { | |
paddingBottom: 20, | |
paddingLeft: 10, | |
marginTop: 6, | |
borderColor: '#F0F0F0', | |
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