Created
April 7, 2022 13:31
-
-
Save RanjanSushant/7fb095d79d6058eaa4aa01f907b7998f to your computer and use it in GitHub Desktop.
Codesphere React Native ToDo App Task component
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, Text, StyleSheet } from "react-native"; | |
function Task(props) { | |
return ( | |
<View style={styles.item}> | |
<View style={styles.itemLeft}> | |
<Text style={styles.itemText}>{props.text}</Text> | |
</View> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
item: { | |
backgroundColor: "#FFF", | |
padding: 15, | |
flexDirection: "row", | |
alignItems: "center", | |
marginBottom: 20, | |
}, | |
itemLeft: { | |
width: "100%", | |
flexDirection: "row", | |
alignItems: "center", | |
flexWrap: "wrap", | |
}, | |
itemText: { | |
maxWidth: "80%", | |
}, | |
}); | |
export default Task; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment