Merge pull request #789 from Textualize/css-path

changed to CSS_PATH
This commit is contained in:
Will McGugan
2022-09-20 14:34:59 +01:00
committed by GitHub
82 changed files with 276 additions and 749 deletions

View File

@@ -43,6 +43,6 @@ class ColorApp(App):
self.screen.styles.animate("background", message.color, duration=0.5)
app = ColorApp()
if __name__ == "__main__":
app = ColorApp()
app.run()

View File

@@ -15,6 +15,8 @@ from textual.widgets import Static, TextInput
class DictionaryApp(App):
"""Searches ab dictionary API as-you-type."""
CSS_PATH = "dictionary.css"
def compose(self) -> ComposeResult:
yield TextInput(placeholder="Search for a word")
yield Vertical(Static(id="results", fluid=False), id="results-container")
@@ -38,6 +40,6 @@ class DictionaryApp(App):
self.query_one("#results", Static).update(JSON(results))
app = DictionaryApp(css_path="dictionary.css")
if __name__ == "__main__":
app = DictionaryApp()
app.run()