Ready to implement file dialog

This commit is contained in:
2025-04-28 21:44:22 +02:00
parent c6851bb50d
commit b30854feea
2 changed files with 42 additions and 11 deletions

View File

@ -0,0 +1,21 @@
import { Button, Dialog, DialogActions, DialogTitle } from "@mui/material";
import { UploadedFile } from "../api/FileApi";
import { filesize } from "filesize";
export function FileViewerDialog(p: {
open: boolean;
onClose: () => void;
file: UploadedFile;
}): React.ReactElement {
return (
<Dialog open={p.open} onClose={p.onClose}>
<DialogTitle>
{p.file.file_name} ({filesize(p.file.file_size)})
</DialogTitle>
TODO
<DialogActions>
<Button onClick={p.onClose}>Close</Button>
</DialogActions>
</Dialog>
);
}