import { Button, Grid, LinearProgress, Paper, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Typography } from "@mui/material" import { ellipsis, formatSpeedMiB, roundMiB } from "../utils" import type { RPCResult } from "../types" type Props = { downloads: RPCResult[] abortFunction: Function } export function DownloadsListView({ downloads, abortFunction }: Props) { return ( Title Progress Speed Size Actions { downloads.map(download => ( {ellipsis(download.info.title, 80)} {formatSpeedMiB(download.progress.speed)} {roundMiB(download.info.filesize_approx ?? 0)} )) }
) }