upd: division
Deskripsi: - ui list diviis - nb: blm selesai No Issues
This commit is contained in:
47
app/(application)/division/index.tsx
Normal file
47
app/(application)/division/index.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
import ButtonTab from "@/components/buttonTab"
|
||||
import InputSearch from "@/components/inputSearch"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign, Feather, MaterialCommunityIcons } from "@expo/vector-icons"
|
||||
import { router, useLocalSearchParams } from "expo-router"
|
||||
import { useState } from "react"
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
|
||||
export default function ListDivision() {
|
||||
const { active } = useLocalSearchParams<{ active?: string }>()
|
||||
const [isList, setList] = useState(false)
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<ScrollView>
|
||||
<View style={[Styles.p15, Styles.mb100]}>
|
||||
<View style={[Styles.wrapBtnTab]}>
|
||||
<ButtonTab
|
||||
active={active == "false" ? "false" : "true"}
|
||||
value="true"
|
||||
onPress={() => { router.push('/division?active=true') }}
|
||||
label="Aktif"
|
||||
icon={<Feather name="check-circle" color={active == "false" ? 'black' : 'white'} size={20} />}
|
||||
n={2} />
|
||||
<ButtonTab
|
||||
active={active == "false" ? "false" : "true"}
|
||||
value="false"
|
||||
onPress={() => { router.push('/division?active=false') }}
|
||||
label="Tidak Aktif"
|
||||
icon={<AntDesign name="closecircleo" color={active == "true" ? 'black' : 'white'} size={20} />}
|
||||
n={2} />
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<InputSearch width={68} />
|
||||
<Pressable onPress={() => { setList(!isList) }}>
|
||||
<MaterialCommunityIcons name={isList ? 'format-list-bulleted' : 'view-grid'} color={"black"} size={30} />
|
||||
</Pressable>
|
||||
</View>
|
||||
<View style={[Styles.mv05]}>
|
||||
<Text>Filter : Dinas</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user