mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Loading indicator (#2018)
* loading indicator and tests * docs * snapshot * remove snapshot * remove debug main [skip ci] * changelog [skip ci] * make start time private
This commit is contained in:
1
docs/api/loading_indicator.md
Normal file
1
docs/api/loading_indicator.md
Normal file
@@ -0,0 +1 @@
|
||||
::: textual.widgets.LoadingIndicator
|
||||
12
docs/examples/widgets/loading_indicator.py
Normal file
12
docs/examples/widgets/loading_indicator.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import LoadingIndicator
|
||||
|
||||
|
||||
class LoadingApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield LoadingIndicator()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = LoadingApp()
|
||||
app.run()
|
||||
@@ -109,6 +109,15 @@ Display a list of items (items may be other widgets).
|
||||
```{.textual path="docs/examples/widgets/list_view.py"}
|
||||
```
|
||||
|
||||
## LoadingIndicator
|
||||
|
||||
Display an animation while data is loading.
|
||||
|
||||
[LoadingIndicator reference](./widgets/loading_indicator.md){ .md-button .md-button--primary }
|
||||
|
||||
```{.textual path="docs/examples/widgets/loading_indicator.py"}
|
||||
```
|
||||
|
||||
## MarkdownViewer
|
||||
|
||||
Display and interact with a Markdown document (adds a table of contents and browser-like navigation to Markdown).
|
||||
|
||||
24
docs/widgets/loading_indicator.md
Normal file
24
docs/widgets/loading_indicator.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# LoadingIndicator
|
||||
|
||||
Displays pulsating dots to indicate when data is being loaded.
|
||||
|
||||
- [ ] Focusable
|
||||
- [ ] Container
|
||||
|
||||
|
||||
=== "Output"
|
||||
|
||||
```{.textual path="docs/examples/widgets/loading_indicator.py"}
|
||||
```
|
||||
|
||||
=== "loading_indicator.py"
|
||||
|
||||
```python
|
||||
--8<-- "docs/examples/widgets/loading_indicator.py"
|
||||
```
|
||||
|
||||
|
||||
|
||||
## See Also
|
||||
|
||||
* [LoadingIndicator](../api/loading_indicator.md) code reference
|
||||
Reference in New Issue
Block a user