mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
docs update
This commit is contained in:
18
docs/examples/light_dark.py
Normal file
18
docs/examples/light_dark.py
Normal 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"
|
||||
|
||||
BIN
docs/images/dom.excalidraw.png
Normal file
BIN
docs/images/dom.excalidraw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
docs/images/events.excalidraw.png
Normal file
BIN
docs/images/events.excalidraw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 446 KiB |
BIN
docs/images/message_pump.excalidraw.png
Normal file
BIN
docs/images/message_pump.excalidraw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 190 KiB |
Reference in New Issue
Block a user