deskripsi:
- fix ViewWrapper : flexibel terhadap keypad
- saat keypad keluar tidak ada lagi space di atas navighation bar

No Issue
This commit is contained in:
2025-07-08 10:46:45 +08:00
parent 1a16b16f47
commit 8abf23fd13
9 changed files with 231 additions and 161 deletions

View File

@@ -1,19 +1,18 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
AvatarCustom,
ButtonCustom,
SelectCustom,
Spacing,
StackCustom,
SelectCustom,
TextInputCustom,
ViewWrapper,
} from "@/components";
import InformationBox from "@/components/Box/InformationBox";
import ButtonUpload from "@/components/Button/ButtonUpload";
import LandscapeFrameUploaded from "@/components/Image/LandscapeFrameUploaded";
import { View } from "react-native";
import { GStyles } from "@/styles/global-styles";
import { useState } from "react";
import { router } from "expo-router";
import { View } from "react-native";
export default function CreateProfile() {
const [data, setData] = useState({
@@ -28,17 +27,21 @@ export default function CreateProfile() {
// router.back();
};
return (
<ViewWrapper
bottomBarComponent={
const footerComponent = (
<View style={GStyles.bottomBar}>
<View style={GStyles.bottomBarContainer}>
<ButtonCustom
onPress={handlerSave}
disabled={!data.name || !data.email || !data.address || !data.gender}
>
Simpan
</ButtonCustom>
}
>
</View>
</View>
);
return (
<ViewWrapper footerComponent={footerComponent}>
<StackCustom>
<InformationBox text="Upload foto profile anda." />
<View style={{ alignItems: "center" }}>
@@ -90,7 +93,14 @@ export default function CreateProfile() {
required
onChange={(value) => setData({ ...(data as any), gender: value })}
/>
<Spacing height={100} />
<TextInputCustom
required
label="Alamat"
placeholder="Masukkan alamat"
value={data.address}
onChangeText={(text) => setData({ ...data, address: text })}
/>
{/* <Spacing /> */}
</StackCustom>
</ViewWrapper>
);

View File

@@ -12,60 +12,20 @@ export default function RootLayout() {
headerStyle: { backgroundColor: MainColor.darkblue },
headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" },
headerTitleAlign: "center",
// contentStyle: {
// borderBottomColor: AccentColor.blue,
// borderBottomWidth: 2,
// },
// headerLargeStyle: {
// backgroundColor: MainColor.darkblue,
// },
// headerShadowVisible: false,
}}
>
<Stack.Screen name="index" options={{ headerShown: false }} />
<Stack.Screen name="verification" options={{ headerShown: false }} />
<Stack.Screen name="register" options={{ headerShown: false }} />
<Stack.Screen name="index" options={{ title: "" }} />
<Stack.Screen
name="verification"
options={{ title: "", headerBackVisible: false }}
/>
<Stack.Screen
name="register"
options={{ title: "", headerBackVisible: false }}
/>
<Stack.Screen name="(application)" options={{ headerShown: false }} />
</Stack>
</SafeAreaProvider>
</>
// <SafeAreaProvider
// style={{
// backgroundColor: AccentColor.darkblue,
// }}
// >
// <SafeAreaView
// edges={[
// "bottom",
// // "top",
// ]}
// style={{
// flex: 1,
// // paddingTop: StatusBar.currentHeight,
// // backgroundColor: MainColor.darkblue,
// }}
// >
// <Stack
// screenOptions={{
// headerStyle: { backgroundColor: MainColor.darkblue },
// headerTitleStyle: { color: MainColor.yellow, fontWeight: "bold" },
// headerTitleAlign: "center",
// // contentStyle: {
// // borderBottomColor: AccentColor.blue,
// // borderBottomWidth: 2,
// // },
// // headerLargeStyle: {
// // backgroundColor: MainColor.darkblue,
// // },
// // headerShadowVisible: false,
// }}
// >
// <Stack.Screen name="index" options={{ headerShown: false }} />
// <Stack.Screen name="verification" options={{ headerShown: false }} />
// <Stack.Screen name="register" options={{ headerShown: false }} />
// <Stack.Screen name="(application)" options={{ headerShown: false }} />
// </Stack>
// </SafeAreaView>
// </SafeAreaProvider>
);
}