|
|
|
@ -4,7 +4,9 @@ import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
|
|
import Group from './components/Group';
|
|
|
|
|
|
|
|
|
|
const Wrapper = styled.div``;
|
|
|
|
|
const Wrapper = styled.div`
|
|
|
|
|
width: 100%;
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
class NotificationsGroup extends PureComponent {
|
|
|
|
|
groupNotifications = notifications => notifications
|
|
|
|
@ -22,45 +24,45 @@ 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: 'info',
|
|
|
|
|
// message: 'this is a message of warning notification',
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// key: 6,
|
|
|
|
|
// title: 'this is a title of info notification s ',
|
|
|
|
|
// type: 'info',
|
|
|
|
|
// message: 'this is a message of info notification',
|
|
|
|
|
// },
|
|
|
|
|
// ];
|
|
|
|
|
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: 'info',
|
|
|
|
|
message: 'this is a message of warning notification',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: 6,
|
|
|
|
|
title: 'this is a title of info notification s ',
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: 'this is a message of info notification',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
const notificationGroups = this.groupNotifications(notifications);
|
|
|
|
|
const sortedNotifications = this.sortByPriority(notificationGroups);
|
|
|
|
|
|
|
|
|
|