Fakultas Ilmu Komputer UI

Commit d4b61d88 authored by angelin depthios's avatar angelin depthios
Browse files

Merge branch 'auth-screen' into 'dev'

Add RegisterScreen and RegisterGoogleFacebookScreen (minus dropdown and back button)

See merge request !30
parents edf37baa df9b8ae3
import { Text, View } from "../../components/Themed";
import * as React from "react";
import { useState } from "react";
import { ScrollView, StyleSheet } from "react-native";
import PlainForm from "../../components/Forms/PlainForm";
import Spacer from "../../components/Spacer/Spacer";
import MainButton from "../../components/button/MainButton";
import Colors from "../../constants/Colors";
import DropdownForm from "../../components/Forms/DropdownForm";
const RegisterGoogleFacebookScreen = () => {
const [firstName, setFirstName] = useState("");
const [lastName, setLastName] = useState("");
const [phoneNo, setPhoneNo] = useState("");
const [picked, setPicked] = useState("");
const [list, setList] = useState();
return (
<ScrollView style={styles.container}>
<View>
<Text style={styles.titleText}>Selamat Datang!</Text>
</View>
<Spacer variant={"xl"} />
<View>
<Text style={styles.description}>
Silakan isi formulir berikut untuk membuat akun Click
</Text>
</View>
<Spacer variant={"xl"} />
<View>
<PlainForm
formTitle={"Nama Depan"}
text={firstName}
setText={setFirstName}
placeholder={"Masukkan Nama Depan"}
disabled
/>
</View>
<Spacer variant={"l"} />
<View>
<PlainForm
formTitle={"Nama Belakang"}
text={lastName}
setText={setLastName}
placeholder={"Masukkan Nama Belakang"}
disabled
/>
</View>
<Spacer variant={"l"} />
<View>
<PlainForm
formTitle={"No. Handphone"}
text={phoneNo}
setText={setPhoneNo}
placeholder={"Masukkan No. Handphone"}
phone
/>
</View>
<Spacer variant={"l"} />
<View>
<DropdownForm
formPlaceholder={"Kategori Bisnis"}
searchPlaceholder={"Cari Kategori Bisnis"}
value={picked}
setValue={setPicked}
items={list}
setItems={setList}
/>
</View>
<Spacer variant={"l"} />
<View>
<Text style={styles.textView}>
Dengan membuat akun Click, saya telah setuju dengan Syarat & Ketentuan
serta Kebijakan Privasi yang telah ditetapkan oleh Click.
</Text>
</View>
<Spacer variant={"l"} />
<View style={styles.button}>
<MainButton text="Daftar" colors="primary" onPress={() => {}} />
</View>
<Spacer variant={"xl"} />
</ScrollView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
fontStyle: "normal",
display: "flex",
backgroundColor: Colors.background,
paddingHorizontal: 24,
},
titleText: {
fontFamily: "HelveticaNeue",
fontSize: 32,
fontStyle: "normal",
fontWeight: "400",
letterSpacing: 0,
textAlign: "left",
paddingTop: 50,
},
description: {
fontFamily: "HelveticaNeue",
fontSize: 20,
fontStyle: "normal",
fontWeight: "300",
letterSpacing: 0,
textAlign: "left",
},
textView: {
fontFamily: "HelveticaNeue",
fontSize: 14,
fontStyle: "normal",
fontWeight: "300",
letterSpacing: 0,
textAlign: "left",
},
button: {
width: "100%",
},
});
export default RegisterGoogleFacebookScreen;
import { Text, View } from "../../components/Themed";
import * as React from "react";
import { useState } from "react";
import { ScrollView, StyleSheet } from "react-native";
import Colors from "../../constants/Colors";
import PlainForm from "../../components/Forms/PlainForm";
import IconForm from "../../components/Forms/IconForm";
import Spacer from "../../components/Spacer/Spacer";
import MainButton from "../../components/button/MainButton";
import DropdownForm from "../../components/Forms/DropdownForm";
const RegisterScreen = () => {
const [firstName, setFirstName] = useState("");
const [lastName, setLastName] = useState("");
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [phoneNo, setPhoneNo] = useState("");
const [picked, setPicked] = useState("");
const [list, setList] = useState();
return (
<ScrollView style={styles.container}>
<View>
<Text style={styles.titleText}>Selamat Datang!</Text>
</View>
<Spacer variant={"xl"} />
<View style={styles.button}>
<MainButton
text="Daftar Menggunakan Google"
colors="secondary"
onPress={() => {}}
/>
</View>
<Spacer variant={"l"} />
<View style={styles.button}>
<MainButton
text="Daftar Menggunakan Facebook"
colors="secondary"
onPress={() => {}}
/>
</View>
<Spacer variant={"xl"} />
<View>
<Text style={styles.description}>
Silakan isi formulir berikut untuk membuat akun Click
</Text>
</View>
<Spacer variant={"xl"} />
<View>
<PlainForm
formTitle={"Nama Depan"}
text={firstName}
setText={setFirstName}
placeholder={"Masukkan Nama Depan"}
/>
</View>
<Spacer variant={"l"} />
<View>
<PlainForm
formTitle={"Nama Belakang"}
text={lastName}
setText={setLastName}
placeholder={"Masukkan Nama Belakang"}
/>
</View>
<Spacer variant={"l"} />
<View>
<PlainForm
formTitle={"Email"}
text={email}
setText={setEmail}
placeholder={"Masukkan Email"}
/>
</View>
<Spacer variant={"l"} />
<View>
<IconForm
formTitle={"Password"}
text={password}
setText={setPassword}
placeholder={"Masukkan Password"}
iconType={"10k"}
password
/>
</View>
<Spacer variant={"l"} />
<View>
<PlainForm
formTitle={"No. Handphone"}
text={phoneNo}
setText={setPhoneNo}
placeholder={"Masukkan No. Handphone"}
phone
/>
</View>
<Spacer variant={"l"} />
<View>
<DropdownForm
formPlaceholder={"Kategori Bisnis"}
searchPlaceholder={"Cari Kategori Bisnis"}
value={picked}
setValue={setPicked}
items={list}
setItems={setList}
/>
</View>
<Spacer variant={"l"} />
<View>
<Text style={styles.textView}>
Dengan membuat akun Click, saya telah setuju dengan Syarat & Ketentuan
serta Kebijakan Privasi yang telah ditetapkan oleh Click.
</Text>
</View>
<Spacer variant={"l"} />
<View style={styles.button}>
<MainButton text="Daftar" colors="primary" onPress={() => {}} />
</View>
<Spacer variant={"xl"} />
</ScrollView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
fontStyle: "normal",
display: "flex",
backgroundColor: Colors.background,
paddingHorizontal: 24,
},
titleText: {
fontFamily: "HelveticaNeue",
fontSize: 32,
fontStyle: "normal",
fontWeight: "400",
letterSpacing: 0,
textAlign: "left",
paddingTop: 50,
},
description: {
fontFamily: "HelveticaNeue",
fontSize: 20,
fontStyle: "normal",
fontWeight: "300",
letterSpacing: 0,
textAlign: "left",
},
textView: {
fontFamily: "HelveticaNeue",
fontSize: 14,
fontStyle: "normal",
fontWeight: "300",
letterSpacing: 0,
textAlign: "left",
},
button: {
width: "100%",
},
});
export default RegisterScreen;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment