Simple lightweight react based notifications. Demo
import Container from './Container';
let myToasts = [
{close: "auto", closeButton: true, type: "warning", content: "abc", time: 3000}
]
<Container theme="light" items={myToasts} />
...another element
import Snack from './Snack';
Snack({close: "auto", time: 3000, type: "info", content: "hello from testElem"});
optional theme dark | light
Name | Values |
---|---|
close | auto |
closeButton | true |
type | info |
content | string |
time | milliseconds |