mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
auto color
This commit is contained in:
36
sandbox/will/design.py
Normal file
36
sandbox/will/design.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from textual.app import App
|
||||
from textual.layout import Container
|
||||
from textual.widgets import Header, Footer, Static
|
||||
|
||||
|
||||
class Content(Static):
|
||||
pass
|
||||
|
||||
|
||||
class Panel(Container):
|
||||
pass
|
||||
|
||||
|
||||
class Panel2(Container):
|
||||
pass
|
||||
|
||||
|
||||
class DesignApp(App):
|
||||
BINDINGS = [("d", "toggle_dark", "Toggle dark mode")]
|
||||
|
||||
def compose(self):
|
||||
yield Header()
|
||||
yield Footer()
|
||||
yield Panel(
|
||||
Content("content"),
|
||||
Panel(
|
||||
Content("more content"),
|
||||
Content("more content"),
|
||||
),
|
||||
)
|
||||
yield Panel(Static("Hello World"))
|
||||
|
||||
|
||||
app = DesignApp(css_path="design.css")
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
Reference in New Issue
Block a user