mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
more docs and diagrams
This commit is contained in:
8
docs/examples/guide/dom1.py
Normal file
8
docs/examples/guide/dom1.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from textual.app import App
|
||||
|
||||
|
||||
class ExampleApp(App):
|
||||
pass
|
||||
|
||||
|
||||
app = ExampleApp()
|
||||
11
docs/examples/guide/dom2.py
Normal file
11
docs/examples/guide/dom2.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Header, Footer
|
||||
|
||||
|
||||
class ExampleApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Footer()
|
||||
|
||||
|
||||
app = ExampleApp()
|
||||
17
docs/examples/guide/dom3.py
Normal file
17
docs/examples/guide/dom3.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.layout import Container
|
||||
from textual.widgets import Header, Footer, Static
|
||||
|
||||
|
||||
class ExampleApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Footer()
|
||||
yield Container(
|
||||
Static(id="widget1"),
|
||||
Static(id="widget2"),
|
||||
Static(id="widget3"),
|
||||
)
|
||||
|
||||
|
||||
app = ExampleApp()
|
||||
0
docs/examples/guide/dom4.css
Normal file
0
docs/examples/guide/dom4.css
Normal file
18
docs/examples/guide/dom4.py
Normal file
18
docs/examples/guide/dom4.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.layout import Container
|
||||
from textual.widget import Widget
|
||||
from textual.widgets import Header, Footer
|
||||
|
||||
|
||||
class ExampleApp(App):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header()
|
||||
yield Footer()
|
||||
yield Container(
|
||||
Widget(id="widget1"),
|
||||
Widget(id="widget2"),
|
||||
Widget(id="widget3"),
|
||||
)
|
||||
|
||||
|
||||
app = ExampleApp()
|
||||
Reference in New Issue
Block a user