fix: some styled for collections and links

This commit is contained in:
Sonny
2024-05-19 16:02:32 +02:00
committed by Sonny
parent 2ba0eccc9f
commit 32133be8b0
5 changed files with 57 additions and 62 deletions

View File

@@ -13,6 +13,13 @@ const CollectionItemStyle = styled(Item)<{ isActive: boolean }>(
})
);
const LinksCount = styled.div(({ theme }) => ({
minWidth: 'fit-content',
fontWeight: 300,
fontSize: '0.9rem',
color: theme.colors.grey,
}));
export default function CollectionItem({
collection,
}: {
@@ -27,8 +34,11 @@ export default function CollectionItem({
onClick={() => setActiveCollection(collection)}
isActive={isActiveCollection}
>
<FolderIcon size={24} />
<FolderIcon css={{ minWidth: '24px' }} size={24} />
<TextEllipsis>{collection.name}</TextEllipsis>
{collection.links.length > 0 && (
<LinksCount> {collection.links.length}</LinksCount>
)}
</CollectionItemStyle>
);
}