0.1.4 • Published 4 years ago

quick-toaster v0.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Toaster

  1. Import withToaster and IToast in the component where you want to create a toast.
  2. Add export default withToaster(Component) to the file
  3. Add toaster to your props interface:
    toaster: {
        add(toast: IToast): void
    },

Finally, you can create a toast with the desired configuration from your component:

this.props.toaster.add({content: 'A new toaster!'});
NameTypeRequiredDescription
contentstringtrueThe content for the toast
headerstringfalseThe header for the toast
variant'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'falseThe toast type
dismissTimernumberfalseAuto dismiss amount in milliseconds
dismissiblebooleanfalseIf you can dismiss the toast

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

5 years ago