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