forked from GodMorning-Front/React_Native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
359 additions
and
112 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { StyleSheet, Text, Pressable } from "react-native"; | ||
|
||
const CustomButton = ({ onPress, text }) => { | ||
return ( | ||
<Pressable onPress={onPress} style={styles.container}> | ||
<Text style={styles.text}>{text}</Text> | ||
</Pressable> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
width: "83%", | ||
height: 45, | ||
alignItems: "center", | ||
marginBottom: 11, | ||
borderRadius: 5, | ||
backgroundColor: "#E5EBFF", | ||
alignSelf: "center", | ||
justifyContent: "center", | ||
}, | ||
text: { | ||
color: "#545454", | ||
fontWeight: "500", | ||
fontSize: 15, | ||
}, | ||
}); | ||
|
||
export default CustomButton; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { StyleSheet, TextInput } from "react-native"; | ||
|
||
const CustomInput = ({ value, setValue, placeholder, secureTextEntry }) => { | ||
return ( | ||
<TextInput | ||
value={value} | ||
onChangeText={setValue} | ||
placeholder={placeholder} | ||
style={styles.input} | ||
secureTextEntry={secureTextEntry} | ||
/> | ||
); | ||
}; | ||
|
||
// 2. style 적용 | ||
|
||
const styles = StyleSheet.create({ | ||
input: { | ||
backgroundColor: "#FFFFFF", | ||
width: "83%", | ||
height: 48, | ||
paddingLeft: 15, | ||
borderRadius: 5, | ||
marginBottom: 18, | ||
alignSelf: "center", | ||
}, | ||
}); | ||
|
||
export default CustomInput; |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
import { StyleSheet, Text, Pressable, Image, View } from "react-native"; | ||
import React from "react"; | ||
import { LinearGradient } from "expo-linear-gradient"; | ||
{ | ||
/*import { | ||
KakaoOAuthToken, | ||
KakaoProfile, | ||
//getProfile as getKakaoProfile, | ||
login, | ||
logout, | ||
unlink, | ||
} from "@react-native-seoul/kakao-login"; | ||
const signInWithKakao = async () => { | ||
const token = await login(); | ||
setResult(JSON.stringify(token)); | ||
}; | ||
const signOutWithKakao = async () => { | ||
const message = await logout(); | ||
setResult(message); | ||
}; | ||
const getKakaoProfile = async () => { | ||
const profile = await getProfile(); | ||
setResult(JSON.stringify(profile)); | ||
}; | ||
const unlinkKakao = async () => { | ||
const message = await unlink(); | ||
setResult(message); | ||
}; | ||
*/ | ||
} | ||
|
||
const InitialScreen = ({ navigation }) => { | ||
const login = () => { | ||
navigation.navigate("Login"); | ||
}; | ||
const signup = () => { | ||
navigation.navigate("SignUp"); | ||
}; | ||
|
||
return ( | ||
<LinearGradient | ||
colors={[ | ||
"#9DC0FF", | ||
"rgba(184, 181, 255, 0.97) ", | ||
"rgba(210, 171, 217, 0.85) ", | ||
"rgba(248, 204, 187, 0.94) ", | ||
"rgba(255, 249, 179, 0.82) ", | ||
]} | ||
style={{ | ||
flex: 1, | ||
width: "100%", | ||
height: "100%", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Image | ||
style={{ | ||
position: "absolute", | ||
width: 500, | ||
height: 500, | ||
}} | ||
source={require("../../assets/images/title.png")} | ||
/> | ||
|
||
<View style={styles.buttonContainer}> | ||
<Pressable onPress={signup} style={styles.button}> | ||
<Text style={styles.text}>Create an Account</Text> | ||
</Pressable> | ||
<Pressable onPress={login} style={styles.button}> | ||
<Text style={styles.text}>Login</Text> | ||
</Pressable> | ||
</View> | ||
</LinearGradient> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
height: 48, | ||
width: 300, | ||
borderRadius: 5, | ||
backgroundColor: "#FFFFFF", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
marginBottom: 20, | ||
}, | ||
buttonContainer: { | ||
marginTop: 400, | ||
}, | ||
text: { | ||
color: "#545454", | ||
fontSize: 16, | ||
fontFamily: "NanumSquareRoundB", | ||
}, | ||
}); | ||
|
||
export default InitialScreen; |
Oops, something went wrong.