upd: lembaga desa

Deskripsi:
- list data lembaga desa
- tambah data lembaga desa
- edit data lembaga desa
- pencarian data lembaga desa
- delete data lembaga desa

No Issues
This commit is contained in:
amel
2025-04-29 15:21:52 +08:00
parent 9b471eb269
commit e17963fb19
7 changed files with 206 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
import Styles from "@/constants/Styles";
import { View, TextInput, Text, Dimensions } from "react-native";
import { Dimensions, Text, TextInput, View } from "react-native";
type Props = {
label?: string;
@@ -15,10 +15,11 @@ type Props = {
round?: boolean
width?: number
bg?: 'white' | 'transparent'
value?: string
};
export function InputForm({ label, placeholder, onChange, info, error, errorText, required, itemLeft, itemRight, type, round, width, bg }: Props) {
export function InputForm({ label, value, placeholder, onChange, info, error, errorText, required, itemLeft, itemRight, type, round, width, bg }: Props) {
const lebar = Dimensions.get("window").width;
if (itemLeft != undefined || itemRight != undefined) {
@@ -35,10 +36,11 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
<View style={[Styles.inputRoundForm, itemRight != undefined ? Styles.inputRoundFormRight : Styles.inputRoundFormLeft, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }, Styles.pv10]}>
{itemRight != undefined ? itemRight : itemLeft}
<TextInput
value={value}
placeholder={placeholder}
keyboardType={type}
onChangeText={onChange}
style={[Styles.mh05, { width: width ? lebar * width / 100: lebar*0.78 }]}
style={[Styles.mh05, { width: width ? lebar * width / 100 : lebar * 0.78 }]}
/>
</View>
{error && (<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]}>{errorText}</Text>)}
@@ -60,6 +62,7 @@ export function InputForm({ label, placeholder, onChange, info, error, errorText
)
}
<TextInput
value={value}
placeholder={placeholder}
keyboardType={type}
style={[Styles.inputRoundForm, error && { borderColor: "red" }, round && Styles.round30, { backgroundColor: bg && bg == 'white' ? 'white' : 'transparent' }]}