acupedia-mobile-ui/src/screens/auth/SignUpScreen.tsx

73 lines
1.6 KiB
TypeScript

import React from "react";
import {
KeyboardAvoidingView,
Platform,
ScrollView,
StyleSheet,
View,
} from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import {
moderateScale,
verticalScale,
} from "react-native-size-matters";
import { router } from "expo-router";
import { Colors } from "@/theme";
import SignUpHeader from "@/features/auth/components/SignUpHeader";
import SignUpForm from "@/features/auth/components/SignUpForm";
import SignUpFooter from "@/features/auth/components/SignUpFooter";
export default function SignUpScreen() {
return (
<SafeAreaView style={styles.safeArea}>
<KeyboardAvoidingView
style={styles.keyboardContainer}
behavior={Platform.OS === "ios" ? "padding" : undefined}
>
<ScrollView
contentContainerStyle={styles.contentContainer}
keyboardShouldPersistTaps="handled"
showsVerticalScrollIndicator={false}
>
<View style={styles.container}>
<SignUpHeader />
<SignUpForm />
<SignUpFooter
onLogInPress={() => {
router.push("/login");
}}
/>
</View>
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
safeArea: {
flex: 1,
backgroundColor: Colors.background,
},
keyboardContainer: {
flex: 1,
},
contentContainer: {
flexGrow: 1,
},
container: {
flex: 1,
paddingHorizontal: moderateScale(24),
paddingTop: verticalScale(20),
paddingBottom: verticalScale(32),
backgroundColor: Colors.background,
},
});