fix: collection name not displayed correctly when too large.

This commit is contained in:
Sonny
2024-11-15 14:23:39 +01:00
parent e8aca90870
commit 1938f6ea23
3 changed files with 16 additions and 5 deletions

View File

@@ -33,14 +33,19 @@ export default function CollectionItem({
href={appendCollectionId(route('dashboard').path, collection.id)}
key={collection.id}
ref={itemRef}
title={collection.name}
>
<FolderIcon className={classes.linkIcon} />
<Text lineClamp={1} maw={showLinks ? '160px' : '200px'}>
<Text lineClamp={1} maw={'200px'} style={{ wordBreak: 'break-all' }}>
{collection.name}
</Text>
{showLinks && (
<Text c="var(--mantine-color-gray-5)" ml="xs">
{linksCount}
<Text
style={{ whiteSpace: 'nowrap' }}
c="var(--mantine-color-gray-5)"
ml={4}
>
{linksCount}0
</Text>
)}
</Link>