Skip to content

Instantly share code, notes, and snippets.

@RanjanSushant
Created April 7, 2022 13:31
Show Gist options
  • Save RanjanSushant/7fb095d79d6058eaa4aa01f907b7998f to your computer and use it in GitHub Desktop.
Save RanjanSushant/7fb095d79d6058eaa4aa01f907b7998f to your computer and use it in GitHub Desktop.
Codesphere React Native ToDo App Task component
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