Skip to content

erikmartinjordan/react-painless-toast

Repository files navigation

react-painless-toast

react-simple-toast version react-simple-toast license

It displays a toast in the right top corner of the window.

Toast

Installation

npm i --save react-painless-toast

How to use it

Parameters to configure:

  • message (string): Text to display.
  • seconds (integer): Number of seconds to display the toast.
  • type(string):
    • Ok: display a toast with green border.
    • Ko: display a toast with red border.
import React from 'react';
import Toast from 'react-painless-toast';

function App() {
    
    return (
        <div className = 'App'>
            <Toast 
                message = {'Changes done successfully!'} 
                seconds = {3} 
                type    = {'Ok'}
            />
        </div>
    );
}

export default App;

Author

Erik Martín Jordán

License

This component is open source and available under the MIT License.

About

🍞 Simple toast component for React.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published