docs update

This commit is contained in:
Will McGugan
2022-06-01 09:58:39 +01:00
parent d71718e784
commit 059ff45392
8 changed files with 42 additions and 8 deletions

View File

@@ -0,0 +1,18 @@
from textual.app import App
from textual.widgets import Button
class ButtonApp(App):
CSS = """
Button {
width: 100%;
}
"""
def compose(self):
yield Button("Light", id="light")
yield Button("Dark", id="dark")
def handle_pressed(self, event):
self.dark = event.button.id == "dark"