mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 07:03:25 +00:00
fix: favorite link and search result styles
This commit is contained in:
@@ -80,6 +80,7 @@ export default function DashboardProviders(
|
||||
enabled: globalHotkeysEnabled,
|
||||
}
|
||||
);
|
||||
|
||||
return (
|
||||
<CollectionsContext.Provider value={collectionsContextValue}>
|
||||
<ActiveCollectionContext.Provider value={activeCollectionContextValue}>
|
||||
|
||||
@@ -15,7 +15,7 @@ const SearchItemStyle = styled('li', {
|
||||
shouldForwardProp: (propName) => propName !== 'isActive',
|
||||
})<{ isActive: boolean }>(({ theme, isActive }) => ({
|
||||
fontSize: '16px',
|
||||
backgroundColor: isActive ? theme.colors.background : 'transparent',
|
||||
backgroundColor: isActive ? theme.colors.secondary : 'transparent',
|
||||
display: 'flex',
|
||||
gap: '0.35em',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -16,6 +16,7 @@ import { appendCollectionId, appendLinkId } from '~/lib/navigation';
|
||||
import { LinkWithCollection } from '~/types/app';
|
||||
|
||||
const FavoriteItemStyle = styled(ItemExternalLink)(({ theme }) => ({
|
||||
height: 'auto',
|
||||
backgroundColor: theme.colors.secondary,
|
||||
}));
|
||||
|
||||
@@ -23,13 +24,20 @@ const FavoriteDropdown = styled(Dropdown)(({ theme }) => ({
|
||||
backgroundColor: theme.colors.secondary,
|
||||
}));
|
||||
|
||||
const FavoriteContainer = styled.div({
|
||||
flex: 1,
|
||||
lineHeight: '1.1rem',
|
||||
});
|
||||
|
||||
export default function FavoriteItem({ link }: { link: LinkWithCollection }) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<FavoriteItemStyle href={link.url}>
|
||||
<LinkFavicon url={link.url} size={24} />
|
||||
<TextEllipsis>{link.name}</TextEllipsis>
|
||||
<Legend>({link.collection.name})</Legend>
|
||||
<FavoriteContainer>
|
||||
<TextEllipsis>{link.name}</TextEllipsis>
|
||||
<Legend>{link.collection.name}</Legend>
|
||||
</FavoriteContainer>
|
||||
<FavoriteDropdown
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -14,7 +14,7 @@ const ProfileStyle = styled(UnstyledList)({
|
||||
gap: '1.25em',
|
||||
});
|
||||
|
||||
const Column = styled.li({
|
||||
const Column = styled.div({
|
||||
display: 'flex',
|
||||
gap: '1rem',
|
||||
flexDirection: 'column',
|
||||
|
||||
Reference in New Issue
Block a user