Closed CareTiger closed 1 year ago
UNotifications
is the wrapper component where the notifications display. A UNotification
component is what is added when you do a toast.add
. You can also simply use a UNotification
as an alert for example.
am confused. if I have <UNotifications />
in app.vue and say I have <UNotification title="Notification" description="This is a notification." />
in /user/profile.vue which one of these is going to be triggered by toast.add()
<UNotifications />
is the container for when you spawn a UNotification
with useToast
. You can also use the UNotification
yourself anywhere in your app. You can read more about it here: https://ui.nuxtlabs.com/overlays/notification
documentation is not clear.
I have checked the documentation
and code
.
There seems to be confusion regarding the following screenshot.
UNotification.vue
Component is not necessary right now since it is used under the hood by UNotifications.vue
UNotification.vue
component for showing notifications by using toast.add
composable which is not possible as of now. UNotification
component Let me know @benjamincanac whether to update the docs for this or provide API for showing UNotification.vue
via toast
composable.
I'm not sure to understand what's wrong with the documentation.
<UNotifications />
iterates over useToast
notifications and display them<UNotification />
is the component that you can use in your app that displays a card with a title, description, icon, etc. useToast()
is the composable that will add a notificationWhy do you want to remove the section of UNotification
?
I've just updated the documentation to be more precise: https://ui.nuxtlabs.com/overlays/notification. Feel free to reopen something is still missing.
Thanks for updating the documentation 👍
document uses UNotification but only
<UNotifications />
works. I think the docs need to be updated.