Files
jellyfin-audio-player/src/screens/modals/Player/components/Backbutton.tsx

27 lines
673 B
TypeScript
Raw Normal View History

import React, { useCallback } from 'react';
import { useNavigation } from '@react-navigation/native';
2023-06-19 23:03:17 +02:00
import XmarkIcon from '@/assets/icons/xmark.svg';
import { TouchableOpacity } from 'react-native';
import styled from 'styled-components/native';
const Container = styled.View`
padding: 6px 12px;
`;
function BackButton() {
const navigation = useNavigation();
const handlePress = useCallback(() => {
navigation.goBack();
}, [navigation]);
return (
<Container>
<TouchableOpacity onPress={handlePress}>
<XmarkIcon />
</TouchableOpacity>
</Container>
);
}
export default BackButton;