Last active
July 17, 2021 13:51
-
-
Save hyochan/8b090764a3ebd4450e04d2d99023822a to your computer and use it in GitHub Desktop.
Sample of relay queries
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 {Button, EditText} from 'dooboo-ui'; | |
import React, {FC, useState} from 'react'; | |
import {RootStackNavigationProps} from '../navigations/RootStack'; | |
import styled from '@emotion/native'; | |
const Container = styled.View` | |
flex: 1; | |
background-color: transparent; | |
padding: 0 40px; | |
flex-direction: column; | |
align-items: center; | |
justify-content: flex-start; | |
`; | |
interface Props { | |
navigation: RootStackNavigationProps<'default'>; | |
} | |
const User: FC<Props> = () => { | |
const [email, setEmail] = useState<string>(''); | |
const [password, setPassword] = useState<string>(''); | |
const signIn = (): void => {}; | |
return ( | |
<Container> | |
<EditText | |
style={{marginTop: 48}} | |
labelText="Email" | |
placeholder="[email protected]" | |
value={email} | |
onChangeText={(text) => { | |
setEmail(text); | |
}} | |
onSubmitEditing={signIn} | |
/> | |
<EditText | |
style={{marginVertical: 24}} | |
labelText="Password" | |
secureTextEntry | |
placeholder="******" | |
value={password} | |
onChangeText={(text) => { | |
setPassword(text); | |
}} | |
onSubmitEditing={signIn} | |
/> | |
<Button onPress={signIn} text="Sign In" loading={isInFlight} /> | |
</Container> | |
); | |
}; | |
export default User; |
Author
hyochan
commented
Jul 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment