chore: ResultFooter

This commit is contained in:
Ibrahima G. Coulibaly
2024-06-25 01:10:41 +01:00
parent ff61712923
commit 173e49a10f
5 changed files with 104 additions and 25 deletions

View File

@@ -0,0 +1,34 @@
import { Stack } from '@mui/material';
import Button from '@mui/material/Button';
import DownloadIcon from '@mui/icons-material/Download';
import ContentPasteIcon from '@mui/icons-material/ContentPaste';
import React from 'react';
export default function ResultFooter({
handleDownload,
handleCopy,
disabled
}: {
handleDownload: () => void;
handleCopy: () => void;
disabled?: boolean;
}) {
return (
<Stack mt={1} direction={'row'} spacing={2}>
<Button
disabled={disabled}
onClick={handleDownload}
startIcon={<DownloadIcon />}
>
Save as
</Button>
<Button
disabled={disabled}
onClick={handleCopy}
startIcon={<ContentPasteIcon />}
>
Copy to clipboard
</Button>
</Stack>
);
}