feat: add dropdown for favorite items

This commit is contained in:
Sonny
2024-07-22 12:10:47 +02:00
parent 2c499a7789
commit 442a1003bb
12 changed files with 174 additions and 94 deletions

View File

@@ -1,6 +1,7 @@
import styled from '@emotion/styled';
import { RefObject, useEffect, useRef, useState } from 'react';
import { AiOutlineFolder } from 'react-icons/ai';
import Legend from '~/components/common/legend';
import TextEllipsis from '~/components/common/text_ellipsis';
import LinkFavicon from '~/components/dashboard/link/link_favicon';
import useCollections from '~/hooks/use_collections';
@@ -22,11 +23,6 @@ const SearchItemStyle = styled('li', {
padding: '0.25em 0.35em !important',
}));
const ItemLegeng = styled.span(({ theme }) => ({
fontSize: '13px',
color: theme.colors.grey,
}));
interface CommonResultProps {
innerRef: RefObject<HTMLLIElement>;
isActive: boolean;
@@ -100,7 +96,7 @@ function ResultLink({
__html: result.matched_part ?? result.name,
}}
/>
<ItemLegeng>({collection.name})</ItemLegeng>
<Legend>({collection.name})</Legend>
</SearchItemStyle>
);
}