feat: Badge documents in sidebar that have been newly shared with you

This commit is contained in:
Tom Moor
2024-02-02 23:09:18 -05:00
parent 1bf0788de6
commit abaa56c8f1
7 changed files with 63 additions and 14 deletions

View File

@@ -14,6 +14,7 @@ import { AvatarSize } from "../Avatar/Avatar";
import Flex from "../Flex";
import Text from "../Text";
import Time from "../Time";
import { UnreadBadge } from "../UnreadBadge";
type Props = {
notification: Notification;
@@ -65,7 +66,7 @@ function NotificationListItem({ notification, onNavigate }: Props) {
/>
)}
</Flex>
{notification.viewedAt ? null : <Unread />}
{notification.viewedAt ? null : <UnreadBadge style={{ right: 20 }} />}
</Container>
</StyledLink>
);
@@ -100,14 +101,4 @@ const Container = styled(Flex)<{ $unread: boolean }>`
}
`;
const Unread = styled.div`
width: 8px;
height: 8px;
background: ${s("accent")};
border-radius: 8px;
align-self: center;
position: absolute;
right: 20px;
`;
export default observer(NotificationListItem);