Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#9] 스타일 refactor #10

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import { backbtncolorbar } from './src/components/navigation/bar/BackBtnColorBar
import Second from './src/screens/test/Second';
import Third from './src/screens/test/Third';
import First from './src/screens/test/First';
import Account from './src/screens/account/Account';
import Agreement from './src/screens/account/Agreement';
import KakaoLoginScreen from './src/screens/login/KakaoLogin';
import GoogleLoginScreen from './src/screens/sign/GoogleLogin';
import GoogleLoginScreen from './src/screens/login/GoogleLogin';
import GetProfile from './src/screens/account/Getprofile';
import Login from './src/screens/login/Login';
import OnBoarding from './src/screens/onboarding/OnBoarding';
import { TouchableOpacity } from 'react-native';

// rn navigatior로 stack 생성, rn은 stack으로 사용자의 이동을 확인한다.
const Stack = createNativeStackNavigator();

Expand All @@ -37,8 +34,7 @@ function App() {
<Stack.Screen name="Third" component={Third} />
<Stack.Screen name="OnBoarding" component={OnBoarding} options={{ headerShown: false}}/>
<Stack.Screen name="Login" component={Login} options={{...backbtncolorbar, title: '로그인'}} />
<Stack.Screen name="Account" component={Account} options={{...backbtncolorbar, title: '가입하기'}}/>
<Stack.Screen name="Agreement" component={Agreement} options={{...backbtncolorbar, title: '가입하기'}}/>
<Stack.Screen name="Agreement" component={Agreement} options={{...backbtncolorbar, title: '이용 약관 동의서'}}/>
<Stack.Screen name="GetProfile" component={GetProfile} options={{...backbtncolorbar, title: '프로필 추가 정보'}}/>
<Stack.Screen name="KakaoLogin" component={KakaoLoginScreen} />
<Stack.Screen name="GoogleLogin" component={GoogleLoginScreen} />
Expand Down
6 changes: 3 additions & 3 deletions src/components/navigation/bar/BackBtnColorBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const CustomBackButton = () => {

export const backbtncolorbar = {
headerStyle: {
backgroundColor: '#FEF7FF',
height: 50,
backgroundColor: '#151515',
height: 40,
},
headerTintColor: '#000000',
headerTintColor: '#ffffff',
headerTitleAlign: 'center',
headerTitleStyle: {
fontWeight: 'bold',
Expand Down
106 changes: 0 additions & 106 deletions src/screens/account/Account.js

This file was deleted.

64 changes: 33 additions & 31 deletions src/screens/account/Agreement.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@ export default function Agreement() {
const [fourchecked, setFourChecked] = useState(false);

const AllChecked = () => {
setFirstChecked(!firstchecked);
setSecondChecked(!secondchecked);
setThirdChecked(!thirdchecked);
setFourChecked(!fourchecked);
setAllchecked(!allchecked);
if(firstchecked == true && secondchecked == true && thirdchecked == true && fourchecked == true) {
setAllchecked(false);
setFirstChecked(false);
setSecondChecked(false);
setThirdChecked(false);
setFourChecked(false);
} else {
setAllchecked(true);
setFirstChecked(true);
setSecondChecked(true);
setThirdChecked(true);
setFourChecked(true);
}
}

// 모든 선택지를 true로 한다면, allchecked도 true로 변경한다.
Expand All @@ -31,22 +39,21 @@ export default function Agreement() {

return (
<View style={styles.container}>
<Text style={styles.title}>약관동의</Text>
<View style={styles.firstcheckcontainer}>
<Checkbox
style={styles.checkbox}
value={allchecked}
onValueChange={() => AllChecked()}
color={allchecked ? '#000000' : undefined}
color={allchecked ? '#000000' : 'rgba(255,255,255,0.3)'}
/>
<Text style={styles.checktext}>전체동의</Text>
<Text style={styles.checktext}>전체 항목에 동의합니다.</Text>
</View>
<View style={styles.checkcontainer}>
<Checkbox
style={styles.checkbox}
value={firstchecked}
onValueChange={setFirstChecked}
color={firstchecked ? '#000000' : undefined}
color={allchecked ? '#000000' : 'rgba(255,255,255,0.3)'}
/>
<Text style={styles.checktext}>약관1)</Text>
</View>
Expand All @@ -55,7 +62,7 @@ export default function Agreement() {
style={styles.checkbox}
value={secondchecked}
onValueChange={setSecondChecked}
color={secondchecked ? '#000000' : undefined}
color={allchecked ? '#000000' : 'rgba(255,255,255,0.3)'}
/>
<Text style={styles.checktext}>약관2)</Text>
</View>
Expand All @@ -64,7 +71,7 @@ export default function Agreement() {
style={styles.checkbox}
value={thirdchecked}
onValueChange={setThirdChecked}
color={thirdchecked ? '#000000' : undefined}
color={allchecked ? '#000000' : 'rgba(255,255,255,0.3)'}
/>
<Text style={styles.checktext}>약관3)</Text>
</View>
Expand All @@ -73,12 +80,12 @@ export default function Agreement() {
style={styles.checkbox}
value={fourchecked}
onValueChange={setFourChecked}
color={fourchecked ? '#000000' : undefined}
color={allchecked ? '#000000' : 'rgba(255,255,255,0.3)'}
/>
<Text style={styles.checktext}>약관4)</Text>
</View>
<TouchableOpacity style={styles.button} onPress={() => navigation.navigate('GetProfile')}>
<Text style={styles.buttontext}>다음으로</Text>
<Text style={styles.buttontext}>완료</Text>
</TouchableOpacity>
</View>
)
Expand All @@ -89,17 +96,10 @@ const styles = StyleSheet.create({
width: '100%',
height: '100%',
alignItems: 'center',
backgroundColor: '#ffffff',
},
title: {
width: '90%',
fontSize: 20,
fontWeight: '800',
marginTop: 10,
textAlign: 'left',
backgroundColor: '#000000',
},
button: {
backgroundColor: '#000000',
backgroundColor: '#151515',
alignItems: 'center',
justifyContent: 'center',
width: '90%',
Expand All @@ -116,28 +116,30 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
width: '90%',
marginTop: 35,
marginTop: 50,
borderBottomWidth: 1,
borderColor: '#dedede',
paddingBottom: 25,
borderColor: '#ffffff',
paddingBottom: 15,
marginBottom: 30,
},
checkcontainer: {
flexDirection: 'row',
alignItems: 'center',
width: '90%',
marginTop: 20,
marginBottom: 60,
},
checktext: {
fontSize: 14,
textAlign: 'center',
fontWeight: '800',
color: '#ffffff',
},
checkbox: {
width: 24,
height: 24,
width: 20,
height: 20,
marginRight: 10,
borderRadius: 0,
borderColor: '#000000',
borderWidth: 1,
borderRadius: 30,
borderWidth: 2.5,
borderColor: 'rgba(255,255,255,0.3)',
},
});
53 changes: 20 additions & 33 deletions src/screens/account/Getprofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,16 @@ export default function GetProfile() {

return (
<View style={styles.container}>
<View style={styles.inputbox}>
<Text style={styles.firstlabel}>프로필 설정</Text>
<Pressable onPress={uploadImage}>
<Image style={styles.imagebox} source={{ uri: imageUrl }}/>
<Image style={styles.image} source={{ uri: imageUrl }}/>
</Pressable>
<Text style={styles.secondlabel}>Nickname</Text>
<View style={styles.inputbox}>
<TextInput
value={nickname}
style={styles.input}
onChangeText={setNickname}
placeholder='닉네임을 입력해주세요'
placeholderTextColor='#979797' />
placeholderTextColor='rgba(0,0,0,0.3)' />
</View>
<TouchableOpacity style={styles.button}>
<Text style={styles.buttontext}>확인</Text>
Expand All @@ -61,49 +59,38 @@ export default function GetProfile() {
width: '100%',
height: '100%',
alignItems: 'center',
backgroundColor: '#ffffff',
backgroundColor: '#000000',
},
inputbox: {
width: '100%',
alignItems: 'center',
textAlign: 'left',
textAlign: 'center',
marginTop: 40,
},
firstlabel: {
width: '90%',
textAlign: 'left',
color: '#979797',
fontSize: 12,
marginTop: 10,
},
imagebox: {
width: 120,
height: 120,
borderColor: '#000000',
borderWidth: 1,
backgroundColor: '#ffc7c7',
image: {
width: 236,
height: 236,
backgroundColor: 'rgba(255, 255, 255, 0.2)',
borderRadius: 120,
marginTop: 100,
},
secondlabel: {
width: '90%',
textAlign: 'left',
color: '#979797',
fontSize: 12,
marginTop: 20,
},
input: {
width: '90%',
borderBottomWidth: 1,
padding: 2,
borderColor: '#d4d4d4',
width: 236,
backgroundColor: '#ffffff',
paddingHorizontal: 20,
paddingVertical: 6,
borderRadius: 100,
fontSize: 16,
textAlign: 'center',
},
button: {
backgroundColor: '#000000',
backgroundColor: '#151515',
alignItems: 'center',
justifyContent: 'center',
width: '90%',
paddingVertical: 18, // 상하 패딩
borderRadius: 10,
marginTop: 25,
marginTop: 110,
},
buttontext: {
color: '#ffffff',
Expand Down
File renamed without changes.
Loading