1
1
import React , { useState } from "react" ;
2
- import { Text , TextInput , View } from "react-native" ;
2
+ import { Switch , Text , TextInput , View } from "react-native" ;
3
3
4
4
import ViewImageScreen from "./app/screens/ViewImageScreen" ;
5
5
import WelcomeScreen from "./app/screens/WelcomeScreen" ;
@@ -10,23 +10,19 @@ import Icon from "./app/components/Icon";
10
10
import ListItem from "./app/components/ListItem" ;
11
11
import AccountScreen from "./app/screens/AccountScreen" ;
12
12
import ListingScreen from "./app/screens/ListingScreen" ;
13
+ import AppTextInput from "./app/components/AppTextInput" ;
13
14
export default function App ( ) {
14
- const [ firstName , setFirstName ] = useState ( "" ) ;
15
- console . log ( firstName )
15
+ // const [firstName, setFirstName] = useState("");
16
+ // console.log(firstName)
17
+ const [ isNew , setIsNew ] = useState ( false ) ;
16
18
return (
17
-
18
19
< Screen >
19
- < Text > { firstName } </ Text >
20
- < TextInput
21
- clearButtonMode = "always"
22
- secureTextEntry
23
- onChangeText = { ( text ) => setFirstName ( text ) }
24
- placeholder = "First Name"
25
- maxLength = { 100 }
26
- keyboardType = "number-pad"
27
- numberOfLines = { 2 }
28
- style = { { borderBottomColor : "#ccc" , borderBottomWidth : 1 } }
29
- > </ TextInput >
20
+ < Switch
21
+ value = { isNew }
22
+ onValueChange = { ( newValue ) => {
23
+ setIsNew ( newValue ) ;
24
+ } }
25
+ />
30
26
</ Screen >
31
27
) ;
32
28
}
0 commit comments