Skip to content

Commit

Permalink
#1 feat: 합격자 등록 - 성공 페이지
Browse files Browse the repository at this point in the history
  • Loading branch information
ywonchae1 committed Sep 21, 2023
1 parent 032b323 commit 6e58e52
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 3 deletions.
32 changes: 29 additions & 3 deletions src/components/Button.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import { View, Text, StyleSheet } from 'react-native'
import React from 'react'
import { FontStyledText } from './Text'
import { COLORS } from '../assets/Theme'

export const MainButton = () => {
export const MainButton = ({children}) => {
return (
<View style={styles.container}>
<FontStyledText style={styles.text}>다음</FontStyledText>
<FontStyledText style={styles.text}>{children}</FontStyledText>
</View>
)
}

export const MiniButton = ({outline, children}) => {
return (
<View style={miniStyles({outline}).miniContainer}>
<FontStyledText style={miniStyles({outline}).miniText}>{children}</FontStyledText>
</View>
)
}
Expand All @@ -15,12 +24,29 @@ const styles = StyleSheet.create({
justifyContent: 'center',
width: '100%',
height: 70,
backgroundColor: '#0BEC12',
backgroundColor: COLORS.green,
borderRadius: 15,
},
text: {
fontSize: 22,
textAlign: 'center',
color: '#000000',
},
})

const miniStyles = ({outline}) => StyleSheet.create({
miniContainer: {
justifyContent: 'center',
width: '100%',
height: 50,
backgroundColor: outline ? 'transparent' : COLORS.green,
borderRadius: 13,
borderColor: outline ? COLORS.green : 'none',
borderWidth: 3,
},
miniText: {
fontSize: 18,
textAlign: 'center',
color: outline ? 'white' : '#000000',
}
})
58 changes: 58 additions & 0 deletions src/screens/AddUserSuccessScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native'
import React from 'react'
import { MiniButton } from '../components/Button'
import { COLORS } from '../assets/Theme'
import { onPressHome } from '../utils'

export default function AddUserSuccessScreen({ navigation }) {
const onPress = () => {
onPressHome(navigation);
}
const onPressKeep = () => {
navigation.navigate('AddUserScreen');
}

return (
<View style={styles.container}>
<Image source={require('../assets/icons/success.png')} style={styles.image} />
<Text style={styles.desc}>회원 정보 추가 완료</Text>
<View style={styles.btnContainer}>
<TouchableOpacity onPress={onPress} style={styles.touchable}>
<MiniButton outline={true}>홈으로</MiniButton>
</TouchableOpacity>
<TouchableOpacity onPress={onPressKeep} style={styles.touchable}>
<MiniButton outline={false}>계속 추가</MiniButton>
</TouchableOpacity>
</View>
</View>
)
}

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 20,
paddingVertical: 20,
backgroundColor: COLORS.bg_black
},
btnContainer: {
justifyContent: 'space-between',
alignItems: 'center',
flexDirection: 'row',
},
image: {
marginVertical: 30
},
desc: {
fontFamily: 'Interop-Bold',
fontSize: 25,
color: 'white',
marginBottom: 30
},
touchable: {
width: '40%',
marginHorizontal: 10
}
})

0 comments on commit 6e58e52

Please sign in to comment.