upd: ui group
Deskripsi: - ui page group - ui tab button - ui list data group - ui modal bottom drawer - ui menu item row - ui tambah data No Issues
This commit is contained in:
23
components/buttonTab.tsx
Normal file
23
components/buttonTab.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { AntDesign, Feather } from "@expo/vector-icons"
|
||||
import { Text, TouchableOpacity } from "react-native"
|
||||
|
||||
type Props = {
|
||||
active: string
|
||||
value: string
|
||||
onPress: () => void
|
||||
label: string
|
||||
icon: React.ReactNode
|
||||
n: number
|
||||
}
|
||||
|
||||
|
||||
export default function ButtonTab({ active, value, onPress, label, n, icon }: Props) {
|
||||
return (
|
||||
<TouchableOpacity style={[Styles.btnTab, (active == value) ? ColorsStatus.orange : ColorsStatus.white, { width: n == 2 ? '50%' : 'auto' }]} onPress={() => { onPress() }}>
|
||||
{icon}
|
||||
<Text style={[Styles.textMediumSemiBold, Styles.ml10, { color: active == value ? 'white' : 'black' }]}>{label}</Text>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user