Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 1.1 KB

README.md

File metadata and controls

52 lines (34 loc) · 1.1 KB

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.