mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
format
This commit is contained in:
@@ -2,13 +2,12 @@ from textual.app import App
|
|||||||
|
|
||||||
|
|
||||||
class Colorizer(App):
|
class Colorizer(App):
|
||||||
|
|
||||||
async def on_load(self, event):
|
async def on_load(self, event):
|
||||||
await self.bind("r", "color('red')")
|
await self.bind("r", "color('red')")
|
||||||
await self.bind("g", "color('green')")
|
await self.bind("g", "color('green')")
|
||||||
await self.bind("b", "color('blue')")
|
await self.bind("b", "color('blue')")
|
||||||
|
|
||||||
async def action_color(self, color:str) -> None:
|
async def action_color(self, color: str) -> None:
|
||||||
self.background = f"on {color}"
|
self.background = f"on {color}"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user