Last active
July 21, 2019 15:22
-
-
Save ralfting/795f99728042c7254bb0f053034ef094 to your computer and use it in GitHub Desktop.
This file contains hidden or 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, { useState } from 'react'; | |
| import { TextInput, Button } from 'react-native-paper'; | |
| import { Text, View } from 'react-native'; | |
| const LoginPage = () => { | |
| const [login, setLogin] = useState(''); | |
| const [password, setPassword] = useState(''); | |
| const onSubmit = () => { | |
| login(credentials); | |
| } | |
| return ( | |
| <View> | |
| <Text>Login page</Text> | |
| <TextInput | |
| label='E-mail' | |
| value={login} | |
| onChangeText={setLogin} | |
| /> | |
| <TextInput | |
| label='Senha' | |
| password={password} | |
| onChangeText={setPassword} | |
| /> | |
| <Button onPress={onSubmit}>Logar</Button> | |
| </View> | |
| ); | |
| }; | |
| export default LoginPage; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment