Skip to content

2.0.0 Consolidate uid/id/toasterId into single toasterId

Compare
Choose a tag to compare
@Stabzs Stabzs released this 12 Apr 19:37
· 42 commits to master since this release

Features

  • all toaster.pop() and toaster pop helper methods (toaster.success(), toaster.error(), etc) return a toast wrapper object composed of a toasterId and toastId.
  • toast.clear() accepts either toasterId and toastId arguments or the toast wrapper object returned from toast.pop().
  • If a toastId is not provided when creating a new toast, a GUID is generated and assigned to the toast before emitting to receiving containers.

Breaking Changes

  • uid and id removed and consolidated into a single toastId
  • prevent duplicates now checks for either last body match OR ID match
    on any toast, since toastId is now always defined
  • prevent duplicates no longer removes the toast first if the id is
    matched, it just returns and does not add the duplicate toast
  • id is no longer incremented per toast container.