Files
mobile-darmasaba/components/buttonTab.tsx
amaliadwiy 5898655fac fix : ios dan tampilan
Deskripsi:
- modal crash
- input keyboard over lap
- detail pengumuman text color
- Scroll view tinggi 100 persen
- image user

nb : blm selesai semua
2025-07-30 17:43:08 +08:00

23 lines
753 B
TypeScript

import { ColorsStatus } from "@/constants/ColorsStatus"
import Styles from "@/constants/Styles"
import { TouchableOpacity } from "react-native"
import Text from "./Text";
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 numberOfLines={1} style={[Styles.textMediumSemiBold, Styles.ml10, { color: active == value ? 'white' : 'black' }]}>{label}</Text>
</TouchableOpacity>
)
}