From 223f0680226f3e558d8a04e24ceb18b970ca9465 Mon Sep 17 00:00:00 2001 From: Gunnar Torfi Date: Sat, 7 Sep 2024 12:30:59 +0000 Subject: [PATCH] docs: loading showcase --- docs/docs/toast.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/toast.md b/docs/docs/toast.md index 4ac8901..bda36b1 100644 --- a/docs/docs/toast.md +++ b/docs/docs/toast.md @@ -103,6 +103,14 @@ const toastId = toast.promise(fetchData(), { }); ``` +### Loading + +The toast.loading function can be used to display a loading message. By default, it renders ActivityIndicator in front of the message. + +```jsx +toast.loading('Loading...'); +``` + In this example, the toast.promise function will display a "Loading data..." message while the fetchData promise is in progress, and update the message to the success or error text based on the promise's outcome. ### Custom JSX