kkduniya-react-flash-message
v1.0.6
Published
Flash message for react
Downloads
31
Readme
kkduniya-react-flash-message
Flash message for react
Install
npm install --save kkduniya-react-flash-message@latest
Usage
// src/App.js
import React from 'react';
import { ToastContainer } from 'kkduniya-react-flash-message'; // Adjust the import path as necessary
function App() {
const handleClick = () => {
window.showToast('This is a success message!', 'success', 'top-right', 3000);
};
return (
<div className="App">
<ToastContainer />
<button onClick={handleClick}>Show Toast</button>
</div>
);
}
export default App;
License
MIT © kkduniya