upd: list anggota

Deskripsi:
- ui list anggota

- note : blm selesai

No Issues
This commit is contained in:
amel
2025-02-28 17:22:02 +08:00
parent 81a234d5cd
commit e8ec2278d3
13 changed files with 194 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ type Props = {
export default function BorderBottomItem({ title, subtitle, icon, desc, onPress, rightTopInfo, borderType }: Props) {
return (
<Pressable style={[borderType == 'bottom' ? Styles.wrapItemBorderBottom : Styles.wrapItemBorderAll]} onPress={onPress}>
<Pressable style={[borderType == 'bottom' ? Styles.wrapItemBorderBottom : Styles.wrapItemBorderAll]} onPressOut={onPress}>
<View style={[Styles.rowItemsCenter]}>
{icon}
<View style={[Styles.rowSpaceBetween, { width: '85%' }]}>

View File

@@ -1,17 +1,17 @@
import Styles from "@/constants/Styles";
import { TouchableWithoutFeedback, View } from "react-native";
import { Pressable, Text, TouchableWithoutFeedback, View } from "react-native";
type PropsBtnHeader = {
onPress?: () => void;
onPress: () => void;
item: React.ReactNode;
};
export function ButtonHeader({ onPress, item }: PropsBtnHeader) {
return (
<TouchableWithoutFeedback onPress={onPress}>
<Pressable onPressOut={() => {onPress()}}>
<View style={[Styles.btnIconHeader]}>
{item}
</View>
</TouchableWithoutFeedback>
</Pressable>
)
}

View File

@@ -2,7 +2,7 @@ import { Feather } from "@expo/vector-icons"
import { ButtonHeader } from "./buttonHeader"
type Props = {
onPress?: () => void
onPress: () => void
}
export default function ButtonMenuHeader({ onPress }: Props) {
@@ -10,7 +10,7 @@ export default function ButtonMenuHeader({ onPress }: Props) {
<>
<ButtonHeader
item={<Feather name="menu" size={20} color="white" />}
onPress={onPress}
onPress={() => onPress()}
/>
</>
)

View File

@@ -18,7 +18,7 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a
<View style={[Styles.modalContent, height != undefined && { height: `${height}%` }]}>
<View style={Styles.titleContainer}>
<Text style={Styles.textDefault}>{title}</Text>
<Pressable onPress={() => setVisible(false)}>
<Pressable onPressOut={() => setVisible(false)}>
<MaterialIcons name="close" color="black" size={22} />
</Pressable>
</View>

View File

@@ -0,0 +1,32 @@
import { router, Stack } from "expo-router"
import ButtonBackHeader from "../buttonBackHeader"
import ButtonMenuHeader from "../buttonMenuHeader"
import { useState } from "react"
import DrawerBottom from "../drawerBottom"
import { View } from "react-native"
import Styles from "@/constants/Styles"
import MenuItemRow from "../menuItemRow"
import { AntDesign } from "@expo/vector-icons"
export default function HeaderMemberList() {
const [isVisible, setVisible] = useState(false)
return (
<>
<ButtonMenuHeader onPress={() => { setVisible(true) }} />
<DrawerBottom animation="slide" isVisible={isVisible} setVisible={setVisible} title="Menu">
<View style={Styles.rowItemsCenter}>
<MenuItemRow
icon={<AntDesign name="pluscircle" color="black" size={25} />}
title="Tambah Anggota"
onPress={() => { }}
/>
<MenuItemRow
icon={<AntDesign name="filter" color="black" size={25} />}
title="Filter"
onPress={() => { }}
/>
</View>
</DrawerBottom>
</>
)
}

View File

@@ -9,7 +9,7 @@ type Props = {
export default function MenuItemRow({ onPress, icon, title }: Props) {
return (
<Pressable onPress={() => { onPress() }} style={[Styles.btnMenuRow]}>
<Pressable onPressOut={() => { console.log('press'); onPress() }} style={[Styles.btnMenuRow]}>
<View style={{ alignItems: 'center' }}>
{icon}
<Text style={[Styles.mt05]}>{title}</Text>

View File

@@ -19,7 +19,7 @@ export default function ModalSelect({ open, close, title, category, choose, onSe
return (
<DrawerBottom animation="none" isVisible={open} setVisible={close} title={title} height={75}>
<View>
<Pressable style={[Styles.itemSelectModal]} onPress={() => {
<Pressable style={[Styles.itemSelectModal]} onPressOut={() => {
onSelect({ val: 'dinas', label: 'Dinas' })
setChoose('dinas')
close(false)

View File

@@ -27,7 +27,7 @@ export default function SelectForm({ label, value, placeholder, onPress, info, e
</Text>
)
}
<Pressable onPress={onPress}>
<Pressable onPressOut={onPress}>
<View style={[Styles.inputRoundForm, Styles.inputRoundFormRight, error && { borderColor: "red" }, round && Styles.round30, Styles.pv10]}>
<Feather name="chevron-right" size={20} color="grey" />
{