-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
67 lines (60 loc) · 1.32 KB
/
App.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React, {useState} from 'react';
import {View, StyleSheet, FlatList, Alert} from 'react-native';
import EditScreen from './screens/Edit';
import WelcomeScreen from './screens/Welcome';
const App = () => {
const [currentScreen, setCurrentScreen] = useState('1');
const[data,setdata]=useState('');
let content = <WelcomeScreen changeScreenParam={setCurrentScreen} setdataparam={setdata}/>;
if (currentScreen !== '1') {
content = <EditScreen changeScreenParam={setCurrentScreen} getdataparam={data}/>
}
return (
<View>
<div>
<header style={css.header}>
<h1 style={css.title}>Todo<span style={css.light}>App</span></h1>
</header>
</div>
{content}
</View>
);
};
const css = {
header: {
backgroundColor: "#171717",
padding: "1em"
},
title: {
color: "#FFCE00",
fontSize: "2.8em",
textAlign: "center",
textTransform: "uppercase"
},
light: {
color: "#F3F3F3",
fontWeight: "300"
},
inputBar: {
display: "flex",
height: "3.5em"
},
input: {
flex: "10",
padding: "0",
margin: "0",
fontSize: "1.8em",
border: "none",
borderBottom: "3px solid #FFCE00",
textIndent: "0.5em"
},
addBtn: {
flex: "2",
fontSize: "1.15em",
backgroundColor: "#FFCE00",
border: "none",
outline: "none",
cursor: "pointer"
}
}
export default App;