Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Add ability to remove notifications#81

Merged
sheridanvk merged 2 commits intosheridan/ch8589/change-default-padding-for-notificationsfrom
sheridan/ch8571/add-ability-to-remove-notifications
Feb 5, 2020
Merged

Add ability to remove notifications#81
sheridanvk merged 2 commits intosheridan/ch8589/change-default-padding-for-notificationsfrom
sheridan/ch8571/add-ability-to-remove-notifications

Conversation

@sheridanvk
Copy link
Copy Markdown
Contributor

@sheridanvk sheridanvk commented Feb 4, 2020

This PR puts removeNotification into context so it can be used inside the NotificationProvider, and modifies the createNotification function to return the notification (which includes its ID), such that the id can then later be used to remove the notification.

Demo here:
https://glitch.com/edit/#!/equatorial-mushroom-a3p4w27vxl?path=lib/notification.js:1:0

I added a button "Remove Last Notification" into the Notification Story to demonstrate how to remove the last notification that was added.

@sheridanvk sheridanvk force-pushed the sheridan/ch8571/add-ability-to-remove-notifications branch from 7cdc208 to 5bde5cf Compare February 4, 2020 22:44
@sheridanvk sheridanvk force-pushed the sheridan/ch8571/add-ability-to-remove-notifications branch from 5bde5cf to 28dd8a0 Compare February 4, 2020 22:46
@sheridanvk sheridanvk marked this pull request as ready for review February 4, 2020 22:48
@sheridanvk sheridanvk requested a review from pheebcodes February 4, 2020 22:49
Copy link
Copy Markdown

@pheebcodes pheebcodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect!!

@sheridanvk sheridanvk merged commit df3b307 into sheridan/ch8589/change-default-padding-for-notifications Feb 5, 2020
@keithk
Copy link
Copy Markdown
Contributor

keithk commented Nov 10, 2020

🚀 PR was released in v0.19.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants