mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
docs plugin
This commit is contained in:
28
docs/examples/simple.py
Normal file
28
docs/examples/simple.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class TextApp(App):
|
||||
CSS = """
|
||||
Screen {
|
||||
background: darkblue;
|
||||
color: white;
|
||||
layout: vertical;
|
||||
}
|
||||
Static {
|
||||
height: auto;
|
||||
padding: 2;
|
||||
border: heavy white;
|
||||
background: #ffffff 30%;
|
||||
content-align: center middle;
|
||||
/**/
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Static("Hello")
|
||||
yield Static("[b]World![/b]")
|
||||
|
||||
|
||||
app = TextApp()
|
||||
Reference in New Issue
Block a user