23 lines
668 B
TypeScript
23 lines
668 B
TypeScript
import Styles from "@/constants/Styles";
|
|
import { Pressable, 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>
|
|
)
|
|
} |