Brandon Presley
f778426aba
Something happened with the deno formatter, I can't remember what! Hahahahahaahahaha
21 lines
465 B
TypeScript
21 lines
465 B
TypeScript
import { useNavigation } from "@react-navigation/native";
|
|
import { Appbar, IconButton } from "react-native-paper";
|
|
|
|
export default function StackHeader({
|
|
title,
|
|
children,
|
|
}: {
|
|
title: string;
|
|
children?: JSX.Element | JSX.Element[];
|
|
}) {
|
|
const navigation = useNavigation();
|
|
|
|
return (
|
|
<Appbar.Header>
|
|
<IconButton icon="arrow-back" onPress={navigation.goBack} />
|
|
<Appbar.Content title={title} />
|
|
{children}
|
|
</Appbar.Header>
|
|
);
|
|
}
|