This function is used to trigger the exit animation for the current message.
Once the animation finishes, the PopMessage
function will be called to
remove it from the queue.
This function is used to immediately remove the current message from the queue without an exit animation.
This will allow you to reset the entire queue and immediately hide all notifications. This will return the current queue at the time of reset if you would like to do some manual logic for adding items to the queue.
This function will restart the visibility timer. This is useful for handling duplicate messages or browser focus loss/gain behavior.
This function will start the visibility timer for the current message. The
default behavior is to start the timer once the message finishes its' enter
animation. Once the timeout finished, the HideMessage
function will be
called to start the exit animation.
This function will stop the visibility timer for the current message. This is
nice to use when the browser is blurred while a toast is visible and then
trigger the RestartVisibilityTimer
once the focus is returned so that
toasts are not shown and hidden without the user being aware.
This is a very low-level component that can be used to animate a new toast in
to a Snackbar
as it is mainly just a wrapper of the CSSTransition
component. If you are using this component, it is generally recommended to
provide the onEntered
callback as a function to start the hide visibility
timer and the onExited
callback to remove the current toast from your
queue.
This component is used to be able to create a queue of messages with the
Snackbar
and Toast
components with a fairly decent API out of the box.
This hook is used to add a message to the queue from anywhere in your app. This should normally be used from click event handlers, but can also be triggered with custom logic within components.
This hook exposes some of the lower level actions for handling a message queue if advanced behavior is desired.
Gets the current message visibility to provide to the toast.
This hook will allow you to get the current queue. This probably shouldn't be used that much.
Generated using TypeDoc
This function is used to add a message to the queue.