File size: 642 Bytes
2c3c408
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from textual.app import App
from textual.containers 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 Container(
            Content("content"),
            Panel(
                Content("more content"),
                Content("more content"),
            ),
        )


app = DesignApp(css_path="design.css")
if __name__ == "__main__":
    app.run()