mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 18:44:05 +02:00
V2 results flow (#4196)
Better tool flow for reusability Pinning Styling of tool flow consumption of files after tooling --------- Co-authored-by: Connor Yoh <[email protected]> Co-authored-by: James Brunton <[email protected]>
This commit is contained in:
co-authored by
Connor Yoh
James Brunton
parent
1468df3e21
commit
4c17c520d7
@@ -0,0 +1,51 @@
|
||||
import React from 'react';
|
||||
import { Stack, Group, ActionIcon, Text } from '@mantine/core';
|
||||
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
||||
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
||||
|
||||
export interface NavigationControlsProps {
|
||||
currentIndex: number;
|
||||
totalFiles: number;
|
||||
onPrevious: () => void;
|
||||
onNext: () => void;
|
||||
}
|
||||
|
||||
const NavigationControls = ({
|
||||
currentIndex,
|
||||
totalFiles,
|
||||
onPrevious,
|
||||
onNext,
|
||||
}: NavigationControlsProps) => {
|
||||
if (totalFiles <= 1) return null;
|
||||
|
||||
return (
|
||||
<Stack align="center" gap="xs" mt="xs">
|
||||
<Group justify="center" gap="xs">
|
||||
<ActionIcon
|
||||
variant="light"
|
||||
size="sm"
|
||||
onClick={onPrevious}
|
||||
disabled={totalFiles <= 1}
|
||||
data-testid="review-panel-prev"
|
||||
>
|
||||
<ChevronLeftIcon style={{ fontSize: '1rem' }} />
|
||||
</ActionIcon>
|
||||
<Text size="xs" c="dimmed">
|
||||
{currentIndex + 1} of {totalFiles}
|
||||
</Text>
|
||||
|
||||
<ActionIcon
|
||||
variant="light"
|
||||
size="sm"
|
||||
onClick={onNext}
|
||||
disabled={totalFiles <= 1}
|
||||
data-testid="review-panel-next"
|
||||
>
|
||||
<ChevronRightIcon style={{ fontSize: '1rem' }} />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavigationControls;
|
||||
Reference in New Issue
Block a user