Crate yew_notifications

Source
Expand description

yew-notifications notifications components library for Yew. It’s like react-toastify but for yew and more simpler.

The purpose of this library is to provide the ability to easily add notifications to the yew web app.

§Examples

  • basic: shows how to use the yew-notifications library and built-in notifications.
  • custom: shows how to write custom notifications.

Structs§

Notification
Standard notification.
NotificationComponent
Standard notification component.
NotificationComponentProps
Props for NotificationComponent
NotificationFactory
Standard notification factory.
NotificationsManager
Returned object from the use_notification hook. Can spawn new notifications.
NotificationsProvider
The notification provider component.
NotificationsProviderProps
Props for NotificationsProvider

Enums§

NotificationType
Standard notification type.
NotificationsPosition
Notifications position on the screen

Traits§

Notifiable
This trait provides an interface for the notification. Everything, that implements this trait, can be used in the NotificationsProvider.
NotifiableComponentFactory
This trait provides an interface for the notification component factory.

Functions§

use_notification
This hook is used to manage notifications. Returned NotificationsManager can be used to spawn new notifications of the type T.