From 65ebd2fd944dea6493135a1ec35e9d2e50841381 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan Date: Fri, 17 Dec 2021 13:04:56 +0000 Subject: [PATCH 1/8] hop --- .../Notifications/NotificationList.tsx | 25 +++++++++++++++++-- .../Notifications/NotificationsDropdown.tsx | 1 + 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/files-ui/src/Components/Elements/Notifications/NotificationList.tsx b/packages/files-ui/src/Components/Elements/Notifications/NotificationList.tsx index 634a7a4377..a2b8d2d80b 100644 --- a/packages/files-ui/src/Components/Elements/Notifications/NotificationList.tsx +++ b/packages/files-ui/src/Components/Elements/Notifications/NotificationList.tsx @@ -4,6 +4,9 @@ import { createStyles, ITheme, makeStyles } from "@chainsafe/common-theme" import dayjs from "dayjs" import relativeTime from "dayjs/plugin/relativeTime" import { Notification } from "./NotificationsDropdown" +import { Trans } from "@lingui/macro" +import { BellIcon } from "@chainsafe/common-components" +import clsx from "clsx" dayjs.extend(relativeTime) const useStyles = makeStyles(({ palette, constants }: ITheme) => @@ -14,17 +17,27 @@ const useStyles = makeStyles(({ palette, constants }: ITheme) => alignItems: "center", cursor: "pointer", backgroundColor: "initial", + "&.empty": { + display: "flex", + flexDirection: "column", + padding: `${constants.generalUnit * 3 }px ${constants.generalUnit * 1.5}px`, + color: palette.additional["gray"][7] + }, "&:hover": { backgroundColor: palette.additional["gray"][3] }, - "svg": { + "& svg": { fill: palette.additional["gray"][9] }, borderBottom: `1px solid ${palette.additional["gray"][5]}`, - ":last-child": { + "&:last-child": { border: "none" } }, + icon: { + transition: "none", + marginBottom: constants.generalUnit + }, notificationTitle: { color: palette.additional["gray"][9], paddingRight: constants.generalUnit * 1.5, @@ -53,6 +66,14 @@ const NotificationList = ({ notifications }: INotificationListProps) => { className={classes.scrollContent} >
+ {notifications.length === 0 && ( +
+ + + There are no notifications! + +
+ )} {notifications.map((n, i) => (
} hideIndicator={true} anchor="bottom-right" + autoclose >
- +
) : (