toast-lib-prystavka
v1.0.30
Published
``` $ yarn add toast-lib-pryst $ npm install --save toast-lib-pryst
Downloads
8
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,
})