fix: tampilan

Deskripsi:
- input form l
- fitur wakil super admin

No Issues
This commit is contained in:
amel
2025-06-24 12:24:25 +08:00
parent 38c08795c5
commit c6635fb88e
4 changed files with 12 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ import Styles from "@/constants/Styles"
import { apiCheckPhoneLogin, apiSendOtp } from "@/lib/api"
import AsyncStorage from "@react-native-async-storage/async-storage"
import { useState } from "react"
import { Image, Text, ToastAndroid, View } from "react-native"
import { Image, SafeAreaView, Text, ToastAndroid, View } from "react-native"
import { ButtonForm } from "../buttonForm"
import { InputForm } from "../inputForm"
import ModalLoading from "../modalLoading"
@@ -40,8 +40,8 @@ export default function ViewLogin({ onValidate }: Props) {
};
return (
<>
<View style={Styles.wrapLogin} >
<SafeAreaView>
<View style={Styles.p20}>
<View style={{ alignItems: "center", marginVertical: 50 }}>
<Image
source={require("../../assets/images/splash-icon.png")}
@@ -68,7 +68,7 @@ export default function ViewLogin({ onValidate }: Props) {
{
loadingLogin && <ModalLoading isVisible={true} setVisible={setLoadingLogin} />
}
</>
</SafeAreaView>
)
}

View File

@@ -34,7 +34,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
</Text>
)
}
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, Styles.pv10, error && { borderColor: "red" }]}>
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, error && { borderColor: "red" }]}>
{itemRight != undefined ? itemRight : itemLeft}
<TextInput
editable={!disable}
@@ -42,7 +42,8 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
placeholder={placeholder}
keyboardType={type}
onChangeText={onChange}
style={[Styles.mh05, { width: width ? lebar * width / 100 : lebar * 0.78 }]}
placeholderTextColor={'gray'}
style={[Styles.mh05, { width: width ? lebar * width / 100 : lebar * 0.78, color: 'black' }]}
/>
</View>
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
@@ -69,6 +70,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable,
keyboardType={type}
style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}
onChangeText={onChange}
placeholderTextColor={'gray'}
/>
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
{info != undefined && (<Text style={[Styles.textInformation, Styles.mt05, Styles.cGray]}>{info}</Text>)}