Add a ScrollArea to the Downloads module

This commit is contained in:
ajnart
2022-05-30 09:19:49 +02:00
parent 67a89ba61a
commit 3c96053b7f

View File

@@ -1,4 +1,13 @@
import { Table, Text, Tooltip, Title, Group, Progress, Skeleton } from '@mantine/core';
import {
Table,
Text,
Tooltip,
Title,
Group,
Progress,
Skeleton,
ScrollArea,
} from '@mantine/core';
import { IconDownload as Download } from '@tabler/icons';
import { useEffect, useState } from 'react';
import axios from 'axios';
@@ -129,12 +138,14 @@ export default function DownloadComponent() {
);
});
return (
<Group noWrap direction="column">
<Group noWrap grow direction="column">
<Title order={4}>Your torrents</Title>
<Table highlightOnHover>
<thead>{ths}</thead>
<tbody>{rows}</tbody>
</Table>
<ScrollArea sx={{ height: 300 }}>
<Table highlightOnHover>
<thead>{ths}</thead>
<tbody>{rows}</tbody>
</Table>
</ScrollArea>
</Group>
);
}