Files
mobile-darmasaba/components/buttonTab.tsx
amel 8806f33a8d upd: projeect
Deskripsi:
- ui list project
- ui grid project
- ui create project

No Issues
2025-03-05 15:35:21 +08:00

23 lines
770 B
TypeScript

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, { width: n == 2 ? '50%' : 'auto' }]} onPress={() => { onPress() }}>
{icon}
<Text style={[Styles.textMediumSemiBold, Styles.ml10, { color: active == value ? 'white' : 'black' }]}>{label}</Text>
</TouchableOpacity>
)
}