Fixed proptypes

pull/70/head^2
Vladimir Volek 6 years ago committed by Szymon Lesisz
parent 3f5c5fdaee
commit da3e1aa878

@ -77,7 +77,7 @@ class Group extends Component {
icon={ICONS.ARROW_DOWN}
color={colors.TEXT_SECONDARY}
size={24}
isActive={this.state.visible}
isActive={!this.state.visible}
canAnimate
/>
</Right>
@ -106,12 +106,14 @@ class Group extends Component {
Group.propTypes = {
type: PropTypes.string,
close: PropTypes.func.isRequired,
groupNotifications: PropTypes.arrayOf({
key: PropTypes.string,
type: PropTypes.string,
title: PropTypes.string,
message: PropTypes.string,
}),
groupNotifications: PropTypes.arrayOf(
PropTypes.shape({
key: PropTypes.number,
type: PropTypes.string,
title: PropTypes.string,
message: PropTypes.string,
}),
),
};
export default Group;

@ -23,45 +23,45 @@ class NotificationsGroup extends Component {
}
render() {
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 { 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 notificationGroups = this.groupNotifications(notifications);
const sortedNotifications = this.sortByPriority(notificationGroups);

Loading…
Cancel
Save