mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
added toaster for notifications and alerts using sonner library
import:
```
import { toast } from 'sonner';
```
basic usage just call:
```
toast('This is an normal toast');
toast.error('This is an error toast');
toast.success('This is an success toast');
toast('This is an action toast', {
action: {
label: 'Action',
onClick: () => console.log('Action!'),
},
});
toast('My cancel toast', {
cancel: <Button onClick={() => console.log('Cancel!')}>Cancel</Button>,
});
```
more usage check here: https://sonner.emilkowal.ski/toast