mwp-toaster

27.0.28 • Public • Published

MWP Toaster

Triggering toasts with Redux actions from anywhere in an MWP app.

Usage

First, you'll have to add the <ToastConainer> somewhere near the root of your React application so that toasts will be visible on any route.

Then, the basic usage is to dispatch makeToast(toastProps) whenever you want a <Toast> to appear. Storybook UI demo

import { makeToast } from 'mwp-toaster';

// ...

dispatch(makeToast({ action: () => {}, actionLabel: 'Get to the chopper' }));

Readme

Keywords

none

Package Sidebar

Install

npm i mwp-toaster

Weekly Downloads

61

Version

27.0.28

License

MIT

Unpacked Size

42.8 kB

Total Files

18

Last publish

Collaborators

  • meetupbot