Add style param to Widget render method

This commit is contained in:
Darren Burns
2022-05-05 16:06:49 +01:00
parent b2553b34b2
commit e473e4873a
21 changed files with 56 additions and 47 deletions

View File

@@ -9,7 +9,7 @@ class Hover(Widget):
mouse_over = Reactive(False)
def render(self) -> Panel:
def render(self, styles: Styles) -> Panel:
return Panel("Hello [b]World[/b]", style=("on red" if self.mouse_over else ""))
def on_enter(self) -> None: