diff --git a/assets/images/placeholderProfileImage.png b/assets/images/placeholderProfileImage.png new file mode 100644 index 0000000..0989209 Binary files /dev/null and b/assets/images/placeholderProfileImage.png differ diff --git a/src/components/TextInput.tsx b/src/components/TextInput.tsx index f6c90b2..4dcbd76 100644 --- a/src/components/TextInput.tsx +++ b/src/components/TextInput.tsx @@ -8,6 +8,11 @@ import DateTimePicker from '@react-native-community/datetimepicker'; import {useState} from 'react'; import {Dropdown} from 'react-native-element-dropdown'; +type DropdownItem = { + label: string; + value: string | number; +}; + interface TextInputComponentProps { title?: string; placeholder?: string; @@ -15,13 +20,13 @@ interface TextInputComponentProps { isRequired?: boolean; isDate?: boolean; isDropdown?: boolean; + dropdownItemData?: DropdownItem[]; + isDisabled?: boolean; + supportText?: string; + containerHeight?: any; + isMultiline?: boolean; } -const genderData = [ - {label: 'Laki-Laki', value: '1'}, - {label: 'Perempuan', value: '2'}, -]; - const TextInputComponent: React.FC = ({ title, placeholder, @@ -29,6 +34,11 @@ const TextInputComponent: React.FC = ({ isRequired = false, isDate = false, isDropdown = false, + dropdownItemData, + isDisabled = false, + supportText, + containerHeight, + isMultiline = false, }) => { const [secureText, setSecureText] = useState(isPassword); const [selectedDate, setSelectedDate] = useState(undefined); @@ -36,13 +46,11 @@ const TextInputComponent: React.FC = ({ const [showPicker, setShowPicker] = useState(false); const [genderValue, setGenderValue] = useState(null); - const renderGenderItem = (item: any) => { - return ( - - {item.label} - - ); - }; + const inputStyle = [ + styles.containerBackground, + styles.placeholderText, + containerHeight && {height: containerHeight}, + ]; const handleDateChange = (event: any, date?: Date) => { if (event.type === 'dismissed') { @@ -60,6 +68,14 @@ const TextInputComponent: React.FC = ({ } }; + const renderDropdownItem = (item: any) => { + return ( + + {item.label} + + ); + }; + const renderInput = () => { if (isDropdown) { return ( @@ -75,17 +91,17 @@ const TextInputComponent: React.FC = ({ placeholderStyle={styles.placeholderDropdownStyle} selectedTextStyle={styles.selectedTextStyle} iconStyle={styles.iconStyle} - data={genderData} + data={dropdownItemData ?? []} maxHeight={300} labelField="label" valueField="value" - placeholder="Jenis Kelamin" + placeholder={placeholder} value={genderValue} onChange={item => { setGenderValue(item.value); }} renderRightIcon={() => } - renderItem={renderGenderItem} + renderItem={renderDropdownItem} /> ); @@ -102,7 +118,7 @@ const TextInputComponent: React.FC = ({ = ({ = ({ /> ) : null } - multiline={false} + multiline={isMultiline} /> + {supportText && {supportText}} ); }; @@ -179,16 +197,6 @@ const styles = StyleSheet.create({ fontSize: 13, ...FontFamily.notoSansRegular, }, - genderItem: { - padding: 16, - flexDirection: 'row', - justifyContent: 'space-between', - alignItems: 'center', - }, - genderTextItem: { - flex: 1, - fontSize: 13, - }, dropdown: { marginTop: 8, backgroundColor: 'white', @@ -212,6 +220,24 @@ const styles = StyleSheet.create({ width: 20, height: 20, }, + dropdownItem: { + padding: 16, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + }, + dropdownTextItem: { + flex: 1, + fontSize: 13, + }, + supportText: { + marginTop: 8, + ...FontFamily.notoSansRegular, + fontSize: 10, + textAlign: 'right', + includeFontPadding: false, + color: Colors.neutral70.color, + }, }); export default TextInputComponent; diff --git a/src/model/DropdownData/CityData.tsx b/src/model/DropdownData/CityData.tsx new file mode 100644 index 0000000..1b31971 --- /dev/null +++ b/src/model/DropdownData/CityData.tsx @@ -0,0 +1,9 @@ +const cityData = [ + {label: 'Jakarta Selatan', value: '1'}, + {label: 'Bandung', value: '2'}, + {label: 'Semarang', value: '3'}, + {label: 'Surabaya', value: '4'}, + {label: 'Denpasar', value: '5'}, +]; + +export default cityData; diff --git a/src/model/DropdownData/DistrictData.tsx b/src/model/DropdownData/DistrictData.tsx new file mode 100644 index 0000000..9efe0b0 --- /dev/null +++ b/src/model/DropdownData/DistrictData.tsx @@ -0,0 +1,9 @@ +const districtData = [ + {label: 'Setiabudi', value: '1'}, + {label: 'Coblong', value: '2'}, + {label: 'Candisari', value: '3'}, + {label: 'Wonokromo', value: '4'}, + {label: 'Denpasar Barat', value: '5'}, +]; + +export default districtData; diff --git a/src/model/DropdownData/GenderData.tsx b/src/model/DropdownData/GenderData.tsx new file mode 100644 index 0000000..061a511 --- /dev/null +++ b/src/model/DropdownData/GenderData.tsx @@ -0,0 +1,6 @@ +const genderData = [ + {label: 'Laki-Laki', value: '1'}, + {label: 'Perempuan', value: '2'}, +]; + +export default genderData; diff --git a/src/model/DropdownData/PostalCodeData.tsx b/src/model/DropdownData/PostalCodeData.tsx new file mode 100644 index 0000000..639615d --- /dev/null +++ b/src/model/DropdownData/PostalCodeData.tsx @@ -0,0 +1,9 @@ +const postalCodeData = [ + {label: '12920', value: '1'}, + {label: '40131', value: '2'}, + {label: '50256', value: '3'}, + {label: '60243', value: '4'}, + {label: '80119', value: '5'}, +]; + +export default postalCodeData; diff --git a/src/model/DropdownData/ProvinceData.tsx b/src/model/DropdownData/ProvinceData.tsx new file mode 100644 index 0000000..3e15591 --- /dev/null +++ b/src/model/DropdownData/ProvinceData.tsx @@ -0,0 +1,9 @@ +const provinceData = [ + {label: 'DKI Jakarta', value: '1'}, + {label: 'Jawa Barat', value: '2'}, + {label: 'Jawa Tengah', value: '3'}, + {label: 'Jawa Timur', value: '4'}, + {label: 'Bali', value: '5'}, +]; + +export default provinceData; diff --git a/src/navigation/RootStack.tsx b/src/navigation/RootStack.tsx index fc70e13..11b65d1 100644 --- a/src/navigation/RootStack.tsx +++ b/src/navigation/RootStack.tsx @@ -11,6 +11,8 @@ import EditProfileScreen from '../screens/editProfile'; import CloseAccountScreen from '../screens/closeAccount'; import {RootStackParamList} from './type'; import TermsAndConnditionsScreen from '../screens/termsAndConditions'; +import NavigationRouteScreen from '../screens/navigationRoute'; +import SetPasswordScreen from '../screens/setPassword'; const Stack = createNativeStackNavigator(); @@ -37,6 +39,11 @@ function RootStack() { component={TermsAndConnditionsScreen} options={{headerShown: false}} /> + + ); } diff --git a/src/navigation/type.ts b/src/navigation/type.ts index 45e3b40..116b507 100644 --- a/src/navigation/type.ts +++ b/src/navigation/type.ts @@ -1,5 +1,6 @@ export type RootStackParamList = { Login: undefined; + NavigationRoute: undefined; Home: undefined; Register: undefined; AccountVerification: undefined; @@ -9,4 +10,5 @@ export type RootStackParamList = { Profile: undefined; EditProfile: undefined; CloseAccount: undefined; + SetPassword: undefined; }; diff --git a/src/screens/accountVerification/index.tsx b/src/screens/accountVerification/index.tsx index 9f8034d..1af35f2 100644 --- a/src/screens/accountVerification/index.tsx +++ b/src/screens/accountVerification/index.tsx @@ -1,12 +1,20 @@ import {useNavigation} from '@react-navigation/native'; import {NativeStackNavigationProp} from '@react-navigation/native-stack'; import React, {useEffect, useRef, useState} from 'react'; -import {Pressable, Text, View, TextInput, Keyboard} from 'react-native'; +import { + Pressable, + Text, + View, + TextInput, + Keyboard, + StatusBar, +} from 'react-native'; import Icon from 'react-native-vector-icons/MaterialIcons'; import {RootStackParamList} from '../../navigation/type'; import styles from './styles'; import {Button} from 'react-native-paper'; import OTPTextInput from '../../components/OTPTextInput'; +import Colors from '../../../assets/styles/Colors'; type AccountVerificationScreenNavigationProp = NativeStackNavigationProp< RootStackParamList, @@ -50,6 +58,10 @@ function AccountVerificationScreen() { return ( + navigation.goBack()}> diff --git a/src/screens/closeAccount/index.tsx b/src/screens/closeAccount/index.tsx index 64828d5..3c31b90 100644 --- a/src/screens/closeAccount/index.tsx +++ b/src/screens/closeAccount/index.tsx @@ -1,21 +1,125 @@ -import React from 'react'; -import {StyleSheet, Text, View} from 'react-native'; +import React, {useState} from 'react'; +import {StatusBar, Text, View} from 'react-native'; +import styles from './styles'; +import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import {NativeStackNavigationProp} from '@react-navigation/native-stack'; +import {RootStackParamList} from '../../navigation/type'; +import {useNavigation} from '@react-navigation/native'; +import Colors from '../../../assets/styles/Colors'; +import TextInputComponent from '../../components/TextInput'; +import {Button, Dialog, PaperProvider, Portal} from 'react-native-paper'; + +type CloseAccountScreenNavigationProp = NativeStackNavigationProp< + RootStackParamList, + 'CloseAccount' +>; function CloseAccountScreen() { + const navigation = useNavigation(); + const closeAccountDescItems = [ + 'Jika Anda membuat akun dengan email atau nomor telepon yang sama, Anda harus melakukan daftar akun ulang.', + 'Beberapa data terkait transaksi dapat disimpan oleh M-Paspor berdasarkan ketentuan peraturan perundang-undangan.', + ]; + const [visible, setVisible] = useState(false); + + const showDialog = () => setVisible(true); + const hideDialog = () => setVisible(false); + + const handleCloseAccount = () => { + navigation.reset({ + index: 0, + routes: [{name: 'Login'}], + }); + }; + return ( - Close Screen + + + + + + + navigation.goBack()} + /> + Tutup Akun + + + + + Hal yang terjadi setelah tutup akun + + + {closeAccountDescItems.map((item, index) => ( + + {index + 1}. + {item} + + ))} + + + + + + + + + + + + + + + Apakah Anda yakin akan menutup akun? + + + + + + + + ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: 'white', - }, -}); - export default CloseAccountScreen; diff --git a/src/screens/closeAccount/styles.tsx b/src/screens/closeAccount/styles.tsx new file mode 100644 index 0000000..fd27e8b --- /dev/null +++ b/src/screens/closeAccount/styles.tsx @@ -0,0 +1,95 @@ +import {StyleSheet} from 'react-native'; +import Colors from '../../../assets/styles/Colors'; +import FontFamily from '../../../assets/styles/FontFamily'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: 'white', + }, + appBarTitle: { + color: Colors.secondary30.color, + ...FontFamily.notoSansRegular, + fontSize: 22, + marginStart: 16, + }, + appBarIcon: { + marginLeft: 16, + }, + appBarContainer: { + height: 64, + flexDirection: 'row', + alignItems: 'center', + }, + contentContainer: { + flex: 1, + justifyContent: 'space-between', + }, + closeAccountInfoContainer: { + marginVertical: 16, + marginHorizontal: 16, + }, + closeAccountTitle: { + fontSize: 16, + ...FontFamily.notoSansExtraBold, + color: Colors.secondary30.color, + marginBottom: 16, + }, + closeAccountDescContainer: { + flexDirection: 'row', + gap: 6, + marginBottom: 16, + }, + closeAccountNumber: { + ...FontFamily.notoSansRegular, + fontSize: 12, + }, + closeAccountDesc: { + flex: 1, + ...FontFamily.notoSansRegular, + textAlign: 'justify', + fontSize: 12, + }, + closeAccountReasonContainer: { + borderWidth: 1, + borderColor: Colors.secondary50.color, + padding: 12, + margin: 16, + borderRadius: 8, + height: 170, + }, + closeAccountButtonContainer: { + gap: 16, + marginHorizontal: 16, + marginBottom: 48, + }, + butttonBack: { + borderColor: Colors.primary30.color, + }, + buttonContinue: { + backgroundColor: Colors.primary30.color, + }, + dialogContainer: { + backgroundColor: 'white', + elevation: 0, + shadowColor: 'transparent', + borderRadius: 20, + }, + dialogTitle: { + color: Colors.indicatorRed.color, + }, + dialogButtonContainer: { + marginHorizontal: 24, + marginBottom: 24, + marginTop: 16, + gap: 16, + }, + buttonApproveCloseAccount: { + backgroundColor: Colors.indicatorRed.color, + }, + buttonCancelCloseAccount: { + borderColor: Colors.indicatorRed.color, + }, +}); + +export default styles; diff --git a/src/screens/editProfile/index.tsx b/src/screens/editProfile/index.tsx index c855ca6..d83b503 100644 --- a/src/screens/editProfile/index.tsx +++ b/src/screens/editProfile/index.tsx @@ -1,21 +1,131 @@ import React from 'react'; -import {StyleSheet, Text, View} from 'react-native'; +import {Image, ScrollView, StatusBar, Text, View} from 'react-native'; +import styles from './styles'; +import Colors from '../../../assets/styles/Colors'; +import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import {RootStackParamList} from '../../navigation/type'; +import {NativeStackNavigationProp} from '@react-navigation/native-stack'; +import {useNavigation} from '@react-navigation/native'; +import TextInputComponent from '../../components/TextInput'; +import genderData from '../../model/DropdownData/GenderData'; +import provinceData from '../../model/DropdownData/ProvinceData'; +import cityData from '../../model/DropdownData/CityData'; +import districtData from '../../model/DropdownData/DistrictData'; +import postalCodeData from '../../model/DropdownData/PostalCodeData'; +import {Button} from 'react-native-paper'; + +type EditProfileScreenNavigationProp = NativeStackNavigationProp< + RootStackParamList, + 'EditProfile' +>; function EditProfileScreen() { + const placeholderProfileImage = require('../../../assets/images/placeholderProfileImage.png'); + const navigation = useNavigation(); + return ( - Edit Screen + + + navigation.goBack()} + /> + Edit Profil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: 'white', - }, -}); - export default EditProfileScreen; diff --git a/src/screens/editProfile/styles.tsx b/src/screens/editProfile/styles.tsx new file mode 100644 index 0000000..3128b92 --- /dev/null +++ b/src/screens/editProfile/styles.tsx @@ -0,0 +1,72 @@ +import {StyleSheet} from 'react-native'; +import FontFamily from '../../../assets/styles/FontFamily'; +import Colors from '../../../assets/styles/Colors'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: 'white', + }, + appBarTitle: { + color: Colors.neutral100.color, + ...FontFamily.notoSansRegular, + fontSize: 22, + marginStart: 16, + }, + appBarIcon: { + marginLeft: 16, + }, + appBarContainer: { + height: 64, + flexDirection: 'row', + alignItems: 'center', + backgroundColor: Colors.secondary30.color, + }, + topContainer: { + backgroundColor: Colors.secondary30.color, + height: 85, + alignItems: 'center', + }, + profileImage: { + height: 125, + width: 100, + borderRadius: 8, + marginTop: 16, + position: 'absolute', + }, + editProfileImageIconContainer: { + backgroundColor: Colors.primary30.color, + padding: 10, + borderRadius: 100, + position: 'absolute', + bottom: -50, + right: 125, + }, + editProfileSectionFieldContainer: { + gap: 16, + marginTop: 72, + marginBottom: 32, + marginHorizontal: 16, + }, + textInputRowContainer: { + justifyContent: 'center', + flexDirection: 'row', + gap: 12, + }, + textInputFlex: { + flex: 1, + }, + editProfileButtonContainer: { + gap: 16, + marginHorizontal: 16, + marginBottom: 48, + }, + editProfileButton: { + backgroundColor: Colors.primary30.color, + }, + closeAccountButton: { + borderColor: Colors.indicatorRed.color, + }, +}); + +export default styles; diff --git a/src/screens/home/index.tsx b/src/screens/home/index.tsx index 9d8bf09..901ebcd 100644 --- a/src/screens/home/index.tsx +++ b/src/screens/home/index.tsx @@ -1,5 +1,6 @@ -import React from 'react'; -import {StyleSheet, Text, View} from 'react-native'; +import * as React from 'react'; +import styles from './styles'; +import {View, Text} from 'react-native'; function HomeScreen() { return ( @@ -9,13 +10,4 @@ function HomeScreen() { ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: 'white', - }, -}); - export default HomeScreen; diff --git a/src/screens/home/styles.tsx b/src/screens/home/styles.tsx new file mode 100644 index 0000000..efc4e0a --- /dev/null +++ b/src/screens/home/styles.tsx @@ -0,0 +1,20 @@ +import {StyleSheet} from 'react-native'; +import Colors from '../../../assets/styles/Colors'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: 'white', + }, + bottomNavLabel: { + color: Colors.neutral100.color, + textAlign: 'center', + alignSelf: 'center', + fontSize: 12, + position: 'absolute', + }, +}); + +export default styles; diff --git a/src/screens/login/index.tsx b/src/screens/login/index.tsx index df24b59..e635039 100644 --- a/src/screens/login/index.tsx +++ b/src/screens/login/index.tsx @@ -1,5 +1,12 @@ import React from 'react'; -import {Image, Pressable, ScrollView, Text, View} from 'react-native'; +import { + Image, + Pressable, + ScrollView, + StatusBar, + Text, + View, +} from 'react-native'; import styles from './styles'; import {Button} from 'react-native-paper'; import TextInputComponent from '../../components/TextInput'; @@ -7,6 +14,7 @@ import Icon from 'react-native-vector-icons/MaterialIcons'; import {useNavigation} from '@react-navigation/native'; import {NativeStackNavigationProp} from '@react-navigation/native-stack'; import {RootStackParamList} from '../../navigation/type'; +import Colors from '../../../assets/styles/Colors'; type LoginScreenNavigationProp = NativeStackNavigationProp< RootStackParamList, @@ -19,6 +27,10 @@ function LoginScreen() { return ( + @@ -27,16 +39,21 @@ function LoginScreen() { Lupa kata sandi? diff --git a/src/screens/navigationRoute/index.tsx b/src/screens/navigationRoute/index.tsx new file mode 100644 index 0000000..c2a0495 --- /dev/null +++ b/src/screens/navigationRoute/index.tsx @@ -0,0 +1,61 @@ +import * as React from 'react'; +import {BottomNavigation, Text} from 'react-native-paper'; +import Colors from '../../../assets/styles/Colors'; +import ProfileScreen from '../profile'; +import styles from './styles'; +import HomeScreen from '../home'; +import HistoryScreen from '../history'; + +const HomeRoute = () => ; +const HistoryRoute = () => ; +const ProfileRoute = () => ; + +function NavigationRouteScreen() { + const [index, setIndex] = React.useState(0); + const [routes] = React.useState([ + { + key: 'home', + title: 'Home', + focusedIcon: 'home', + unfocusedIcon: 'home-outline', + }, + { + key: 'history', + title: 'History', + focusedIcon: 'history', + }, + { + key: 'profile', + title: 'Profile', + focusedIcon: 'account-circle', + unfocusedIcon: 'account-circle-outline', + }, + ]); + + const renderScene = BottomNavigation.SceneMap({ + home: HomeRoute, + history: HistoryRoute, + profile: ProfileRoute, + }); + + return ( + ( + {route.title} + )} + /> + ); +} + +export default NavigationRouteScreen; diff --git a/src/screens/navigationRoute/styles.tsx b/src/screens/navigationRoute/styles.tsx new file mode 100644 index 0000000..96c6ca3 --- /dev/null +++ b/src/screens/navigationRoute/styles.tsx @@ -0,0 +1,14 @@ +import {StyleSheet} from 'react-native'; +import Colors from '../../../assets/styles/Colors'; + +const styles = StyleSheet.create({ + bottomNavLabel: { + color: Colors.neutral100.color, + textAlign: 'center', + alignSelf: 'center', + fontSize: 12, + position: 'absolute', + }, +}); + +export default styles; diff --git a/src/screens/profile/index.tsx b/src/screens/profile/index.tsx index e239af7..74675f1 100644 --- a/src/screens/profile/index.tsx +++ b/src/screens/profile/index.tsx @@ -1,21 +1,85 @@ import React from 'react'; -import {StyleSheet, Text, View} from 'react-native'; +import {Image, StatusBar, Text, View} from 'react-native'; +import styles from './styles'; +import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import Colors from '../../../assets/styles/Colors'; +import {Button} from 'react-native-paper'; +import {NativeStackNavigationProp} from '@react-navigation/native-stack'; +import {RootStackParamList} from '../../navigation/type'; +import {useNavigation} from '@react-navigation/native'; + +type ProfileScreenNavigationProp = NativeStackNavigationProp< + RootStackParamList, + 'Profile' +>; function ProfileScreen() { + const placeholderProfileImage = require('../../../assets/images/placeholderProfileImage.png'); + const navigation = useNavigation(); return ( - Profile Screen + + + Profil + + + + Salwa Aisyah Adhani + 3271234560009123456 + + + + salwaadhani@gmail.com + + + + 085123456789 + + + + 22 Februari 2002 + + + + Jl. Raya Muchtar + + + + + + ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: 'white', - }, -}); - export default ProfileScreen; diff --git a/src/screens/profile/styles.tsx b/src/screens/profile/styles.tsx new file mode 100644 index 0000000..545260f --- /dev/null +++ b/src/screens/profile/styles.tsx @@ -0,0 +1,74 @@ +import {StyleSheet} from 'react-native'; +import Colors from '../../../assets/styles/Colors'; +import FontFamily from '../../../assets/styles/FontFamily'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: 'white', + }, + topContainer: { + width: '100%', + backgroundColor: Colors.secondary30.color, + alignItems: 'center', + marginBottom: 16, + }, + appBarTitle: { + color: Colors.neutral100.color, + ...FontFamily.notoSansExtraBold, + fontSize: 28, + marginStart: 16, + marginVertical: 14, + }, + appBarContainer: { + height: 64, + backgroundColor: Colors.secondary30.color, + justifyContent: 'center', + }, + profileImage: { + height: 125, + width: 100, + borderRadius: 8, + marginTop: 16, + }, + accountName: { + marginTop: 16, + ...FontFamily.notoSansBold, + fontSize: 18, + color: Colors.neutral100.color, + }, + accountNumber: { + ...FontFamily.notoSansRegular, + fontSize: 14, + color: Colors.neutral100.color, + marginBottom: 16, + }, + sectionProfileField: { + flexDirection: 'row', + gap: 16, + marginHorizontal: 16, + paddingVertical: 12, + }, + sectionProfileText: { + ...FontFamily.notoSansRegular, + fontSize: 12, + }, + sectionButtonContainer: { + flexDirection: 'row', + justifyContent: 'center', + gap: 16, + marginHorizontal: 16, + marginTop: 32, + }, + sectionButtonStyle: { + flex: 1, + backgroundColor: Colors.primary30.color, + }, + logoutButton: { + marginTop: 16, + marginHorizontal: 16, + borderColor: Colors.indicatorRed.color, + }, +}); + +export default styles; diff --git a/src/screens/register/index.tsx b/src/screens/register/index.tsx index a39a492..0758650 100644 --- a/src/screens/register/index.tsx +++ b/src/screens/register/index.tsx @@ -1,6 +1,6 @@ import {NativeStackNavigationProp} from '@react-navigation/native-stack'; import React, {useState} from 'react'; -import {Pressable, ScrollView, Text, View} from 'react-native'; +import {Pressable, ScrollView, StatusBar, Text, View} from 'react-native'; import {RootStackParamList} from '../../navigation/type'; import {CommonActions, useNavigation} from '@react-navigation/native'; import Icon from 'react-native-vector-icons/MaterialIcons'; @@ -8,6 +8,7 @@ import styles from './styles'; import TextInputComponent from '../../components/TextInput'; import {Button, Checkbox} from 'react-native-paper'; import Colors from '../../../assets/styles/Colors'; +import genderData from '../../model/DropdownData/GenderData'; type RegisterScreenNavigationProp = NativeStackNavigationProp< RootStackParamList, @@ -20,6 +21,10 @@ function RegisterScreen() { return ( + navigation.goBack()}> @@ -55,6 +60,7 @@ function RegisterScreen() { placeholder="Jenis Kelamin" isRequired isDropdown + dropdownItemData={genderData} /> diff --git a/src/screens/setPassword/index.tsx b/src/screens/setPassword/index.tsx index f21ff8e..61d66d7 100644 --- a/src/screens/setPassword/index.tsx +++ b/src/screens/setPassword/index.tsx @@ -1,21 +1,66 @@ import React from 'react'; -import {StyleSheet, Text, View} from 'react-native'; +import {StatusBar, Text, View} from 'react-native'; +import styles from './styles'; +import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import TextInputComponent from '../../components/TextInput'; +import Colors from '../../../assets/styles/Colors'; +import {Button} from 'react-native-paper'; +import {useNavigation} from '@react-navigation/native'; +import {RootStackParamList} from '../../navigation/type'; +import {NativeStackNavigationProp} from '@react-navigation/native-stack'; + +type SetPasswordScreenNavigationProp = NativeStackNavigationProp< + RootStackParamList, + 'SetPassword' +>; function SetPasswordScreen() { + const navigation = useNavigation(); + return ( - Set Password Screen + + + navigation.goBack()} + /> + Atur Kata Sandi + + + + + + + ); } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - backgroundColor: 'white', - }, -}); - export default SetPasswordScreen; diff --git a/src/screens/setPassword/styles.tsx b/src/screens/setPassword/styles.tsx new file mode 100644 index 0000000..bac103c --- /dev/null +++ b/src/screens/setPassword/styles.tsx @@ -0,0 +1,36 @@ +import {StyleSheet} from 'react-native'; +import FontFamily from '../../../assets/styles/FontFamily'; +import Colors from '../../../assets/styles/Colors'; + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: 'white', + }, + appBarTitle: { + color: Colors.secondary30.color, + ...FontFamily.notoSansRegular, + fontSize: 22, + marginStart: 16, + }, + appBarIcon: { + marginLeft: 16, + }, + appBarContainer: { + height: 64, + flexDirection: 'row', + alignItems: 'center', + }, + setPasswordSectionFieldContainer: { + gap: 16, + marginTop: 16, + marginBottom: 32, + marginHorizontal: 16, + }, + buttonSetPassword: { + marginHorizontal: 16, + backgroundColor: Colors.primary30.color, + }, +}); + +export default styles; diff --git a/src/screens/termsAndConditions/index.tsx b/src/screens/termsAndConditions/index.tsx index d32bd6b..0773683 100644 --- a/src/screens/termsAndConditions/index.tsx +++ b/src/screens/termsAndConditions/index.tsx @@ -1,10 +1,11 @@ import React from 'react'; -import {Pressable, ScrollView, Text, View} from 'react-native'; +import {Pressable, ScrollView, StatusBar, Text, View} from 'react-native'; import styles from './styles'; import Icon from 'react-native-vector-icons/MaterialIcons'; import {RootStackParamList} from '../../navigation/type'; import {NativeStackNavigationProp} from '@react-navigation/native-stack'; import {useNavigation} from '@react-navigation/native'; +import Colors from '../../../assets/styles/Colors'; type TermsAndConditionsScreenNavigationProp = NativeStackNavigationProp< RootStackParamList, @@ -16,6 +17,10 @@ function TermsAndConnditionsScreen() { return ( + navigation.goBack()}>