feature
deskripsi: - tampilan edit profile - resourcing stack - fix text input & buttom
This commit is contained in:
@@ -1,17 +1,64 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { TextInputCustom, ViewWrapper } from "@/components";
|
||||
import { StackCustom } from "@/components/Stack";
|
||||
import {
|
||||
ButtonCustom,
|
||||
StackCustom,
|
||||
TextCustom,
|
||||
TextInputCustom,
|
||||
ViewWrapper,
|
||||
} from "@/components";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function ProfileEdit() {
|
||||
const { id } = useLocalSearchParams();
|
||||
|
||||
const [nama, setNama] = useState("Bagas Banuna");
|
||||
const [email, setEmail] = useState("bagasbanuna@gmail.com");
|
||||
const [alamat, setAlamat] = useState("Bandar Lampung");
|
||||
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<StackCustom>
|
||||
<TextInputCustom label="Nama" value="Nama" required />
|
||||
<TextInputCustom label="Email" value="Email" required />
|
||||
<TextInputCustom label="Alamat" value="Alamat" required />
|
||||
|
||||
<ViewWrapper
|
||||
bottomBarComponent={
|
||||
<ButtonCustom
|
||||
radius={30}
|
||||
disabled={!nama || !email || !alamat}
|
||||
onPress={() => {
|
||||
console.log("data >>", nama, email, alamat);
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</ButtonCustom>
|
||||
}
|
||||
>
|
||||
<StackCustom gap={"xs"}>
|
||||
<TextInputCustom
|
||||
label="Nama"
|
||||
placeholder="Nama"
|
||||
value={nama}
|
||||
onChangeText={(text) => {
|
||||
setNama(text);
|
||||
}}
|
||||
required
|
||||
/>
|
||||
<TextInputCustom
|
||||
label="Email"
|
||||
placeholder="Email"
|
||||
value={email}
|
||||
onChangeText={(text) => {
|
||||
setEmail(text);
|
||||
}}
|
||||
required
|
||||
/>
|
||||
<TextInputCustom
|
||||
label="Alamat"
|
||||
placeholder="Alamat"
|
||||
value={alamat}
|
||||
onChangeText={(text) => {
|
||||
setAlamat(text);
|
||||
}}
|
||||
required
|
||||
/>
|
||||
</StackCustom>
|
||||
</ViewWrapper>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user