Link the Header docs to App.title and App.sub_title

Closes #3103.
This commit is contained in:
Dave Pearson
2023-08-21 12:57:16 +01:00
parent 39473fc17c
commit 30bd82e25e
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from textual.app import App, ComposeResult
from textual.widgets import Header
class HeaderApp(App):
def compose(self) -> ComposeResult:
yield Header()
def on_mount(self) -> None:
self.title = "Header Application"
self.sub_title = "With title and sub-title"
if __name__ == "__main__":
app = HeaderApp()
app.run()