Skip to content

Commit

Permalink
docs: loading showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnartorfis committed Sep 7, 2024
1 parent 6765f22 commit 223f068
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/docs/toast.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 223f068

Please sign in to comment.