Ready to implement file dialog
This commit is contained in:
21
moneymgr_web/src/dialogs/FileViewerDialog.tsx
Normal file
21
moneymgr_web/src/dialogs/FileViewerDialog.tsx
Normal 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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user