From 67bc6e07c169dab6058643efec55e766707dd0e7 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Thu, 21 Mar 2019 15:00:06 +0100 Subject: [PATCH] fix notification groups icons --- .../components/Group/index.js | 6 +- .../components/NotificationsGroups/index.js | 98 +++++++++---------- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/src/components/notifications/Context/components/Action/components/NotificationsGroups/components/Group/index.js b/src/components/notifications/Context/components/Action/components/NotificationsGroups/components/Group/index.js index d265b191..8f5e135c 100644 --- a/src/components/notifications/Context/components/Action/components/NotificationsGroups/components/Group/index.js +++ b/src/components/notifications/Context/components/Action/components/NotificationsGroups/components/Group/index.js @@ -37,6 +37,10 @@ const StyledNotification = styled(Notification)` } `; +const StyledIcon = styled(Icon)` + margin-right: 6px; +`; + class Group extends PureComponent { constructor() { super(); @@ -68,7 +72,7 @@ class Group extends PureComponent { {groupNotifications.length > 1 && (
- + {groupNotifications.length}{' '} {groupNotifications.length > 1 ? `${type}s` : type} diff --git a/src/components/notifications/Context/components/Action/components/NotificationsGroups/index.js b/src/components/notifications/Context/components/Action/components/NotificationsGroups/index.js index 4fa79286..888ca2c4 100644 --- a/src/components/notifications/Context/components/Action/components/NotificationsGroups/index.js +++ b/src/components/notifications/Context/components/Action/components/NotificationsGroups/index.js @@ -24,55 +24,55 @@ class NotificationsGroup extends PureComponent { } render() { - const { close, notifications } = this.props; - // const notifications = [ - // { - // key: 1, - // title: 'this is a title of error notification', - // type: 'error', - // message: 'this is a message of error notification', - // }, - // { - // key: 2, - // title: 'this is a title of warning notification', - // type: 'warning', - // message: 'this is a message of warning notification', - // }, - // { - // key: 3, - // title: 'this is a title of warning notification', - // type: 'warning', - // message: 'this is a message of warning notification', - // }, - // { - // key: 4, - // title: 'this is a title of warning notification sds d', - // type: 'warning', - // message: 'this is a message of warning notification', - // }, - // { - // key: 5, - // title: 'this is a title of warning notification as', - // type: 'success', - // }, - // { - // key: 6, - // title: 'this is a title of warning notification as', - // type: 'info', - // message: 'this is a message of warning notification', - // }, - // { - // key: 7, - // title: 'this is a title of info notification s ', - // type: 'info', - // message: 'this is a message of info notification', - // actions: - // [{ - // label: 'Update', - // callback: 'props.routerActions.gotoBridgeUpdate', - // }], - // }, - // ]; + const { close } = this.props; + const notifications = [ + { + key: 1, + title: 'this is a title of error notification', + type: 'error', + message: 'this is a message of error notification', + }, + { + key: 2, + title: 'this is a title of warning notification', + type: 'warning', + message: 'this is a message of warning notification', + }, + { + key: 3, + title: 'this is a title of warning notification', + type: 'warning', + message: 'this is a message of warning notification', + }, + { + key: 4, + title: 'this is a title of warning notification sds d', + type: 'warning', + message: 'this is a message of warning notification', + }, + { + key: 5, + title: 'this is a title of warning notification as', + type: 'success', + }, + { + key: 6, + title: 'this is a title of warning notification as', + type: 'info', + message: 'this is a message of warning notification', + }, + { + key: 7, + title: 'this is a title of info notification s ', + type: 'info', + message: 'this is a message of info notification', + actions: + [{ + label: 'Update', + callback: 'props.routerActions.gotoBridgeUpdate', + }], + }, + ]; const notificationGroups = this.groupNotifications(notifications); const sortedNotifications = this.sortByPriority(notificationGroups);