mirror of
https://github.com/sawyerf/Castafiore.git
synced 2026-03-24 12:57:47 +08:00
28 lines
658 B
JavaScript
28 lines
658 B
JavaScript
import React from 'react';
|
|
import { useNavigation } from '@react-navigation/native';
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
|
import IconButton from '~/components/button/IconButton';
|
|
import size from '~/styles/size';
|
|
|
|
const BackButton = () => {
|
|
const navigation = useNavigation();
|
|
const insets = useSafeAreaInsets();
|
|
|
|
return (
|
|
<IconButton
|
|
style={{
|
|
position: 'absolute',
|
|
top: insets.top,
|
|
left: insets.left,
|
|
padding: 20,
|
|
zIndex: 2,
|
|
}} onPress={() => navigation.goBack()}
|
|
icon="chevron-left"
|
|
size={size.icon.small}
|
|
color="#fff"
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default BackButton; |