prys-toast-library
v1.0.10-np
Published
``` $ yarn add toast-lib-pryst $ npm install --save toast-lib-pryst
Downloads
5
Readme
toast-lib-pryst
Installing
$ yarn add toast-lib-pryst
$ npm install --save toast-lib-pryst
How to use
import { ToastProvider, toastService } from 'toast-lib-pryst'
- Create useState to store toasts
const [toast, setToast] = useState([])
- Create a toast with the necessary parameters
toastService.createToast({
duration = 3,
title = 'Default',
position = 'right-top',
description = 'default',
animation = 'smooth',
offset = 5,
type = 'success',
color,
})