Closed KipSigei closed 4 years ago
This should be done in tandem with this one https://github.com/onaio/js-tools/issues/131
@KipSigei @moshthepitt As we are following ant design, and displaying Notification from there. reveal-frontend is using react-toastify for showing notifications.
@KipSigei will give us the last word on this. However I think what we may want is a wrapper that can use both of these.
I suggest we stick with the ant notifications, We should build a wrapper around the antd notification component, and have it show success, error, info and warning messages.
@moshthepitt @KipSigei @dubdabasoduba In case of adding notification in Utils, we have to call the notification like this
Notification({
type: 'success',
message: 'message here',
description: 'description here',
});
OR
Notification('success', 'message here', 'description here');
And by default we have to use it like
notification.error({
message: 'Title',
description: 'Description'
});
Which doesn’t makes any difference
Some thoughts:
sendSuccessNotification
@moshthepitt We can set message and description to default empty string if nothing is sent.
In that case we have to create a separate utils for notifications like
sendSuccessNotification('any title', 'any description')
sendInfoNotification()
sendWarningNotification()
sendErrorNotification()
Add growl notifications to notify users on completed actions or when errors occur