You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
470 B
17 lines
470 B
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
import { useRawToasterForHook } from "src/ui/toaster"
|
|
|
|
/**
|
|
* useToaster provides a mechanism to display toasts. It returns an object with
|
|
* methods to show, dismiss, or clear all toasts:
|
|
*
|
|
* const toastKey = toaster.show({ message: "Hello world" })
|
|
* toaster.dismiss(toastKey)
|
|
* toaster.clear()
|
|
*
|
|
*/
|
|
const useToaster = useRawToasterForHook
|
|
|
|
export default useToaster
|
|
|