JSPM

  • Created
  • Published
  • Downloads 3309
  • Score
    100M100P100Q124741F
  • License MIT

Simple toast popup for React

Package Exports

  • react-simple-toasts

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-simple-toasts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-simple-toasts

Simple toast for React

NPM JavaScript Style Guide

Install

npm install --save react-simple-toasts

Usage

a very simple use

toast('Hello toast')

import React from 'react'
import toast from 'react-simple-toasts'

const Example = () => (
    <div className="example">
        <button onClick={() => toast('Hello toast!')}>Toast</button>
        <button onClick={() => toast('This message is displayed for 1 second.', 1000)}>One-second toast</button>
    </div>
);

Demo

License

MIT © almond-bongbong