Files
mobile-darmasaba/components/buttonHeader.tsx
2025-06-26 10:16:33 +08:00

23 lines
675 B
TypeScript

import Styles from "@/constants/Styles";
import { Pressable, Text, View } from "react-native";
type PropsBtnHeader = {
onPress: () => void;
item: React.ReactNode;
valueTop?: boolean;
};
export function ButtonHeader({ onPress, item, valueTop }: PropsBtnHeader) {
return (
<Pressable onPress={() => { onPress() }}>
<View style={[Styles.btnIconHeader]}>
{item}
</View>
{
valueTop != undefined && valueTop && (
<View style={{ position: 'absolute', top: 0, right: 0, backgroundColor: 'red', width: 10, height: 10, borderRadius: 100 }}> </View>
)
}
</Pressable>
)
}