Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxiaozero committed Dec 10, 2024
1 parent 8bf83d6 commit cc21e25
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion thaw/src/loading_bar/docs/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<MessageBarBody>
<h3 style="margin: 0">"Prerequisite"</h3>
<p>
"If you want to use loading bar, you need to wrap the component where you call related methods inside LoadingBarProvider and use use_loading_bar to get the API."
"If you want to use loading bar, you need to wrap the component where you call related methods inside LoadingBarProvider and use LoadingBarInjection::expect_use to get the API."
</p>
</MessageBarBody>
</MessageBar>
Expand Down
9 changes: 9 additions & 0 deletions thaw/src/toast/docs/mod.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Toast

<MessageBar layout=MessageBarLayout::Multiline intent=MessageBarIntent::Warning>
<MessageBarBody>
<h3 style="margin: 0">"Prerequisite"</h3>
<p>
"If you want to use toast, you need to wrap the component where you call related methods inside ToasterProvider and use ToasterInjection::expect_use to get the API."
</p>
</MessageBarBody>
</MessageBar>

```rust demo
let toaster = ToasterInjection::expect_context();

Expand Down

0 comments on commit cc21e25

Please sign in to comment.