mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add style param to Widget render method
This commit is contained in:
@@ -11,7 +11,7 @@ from textual.widgets.tabs import Tabs, Tab
|
||||
|
||||
|
||||
class Hr(Widget):
|
||||
def render(self) -> RenderableType:
|
||||
def render(self, styles: Styles) -> RenderableType:
|
||||
return Rule()
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class Info(Widget):
|
||||
super().__init__()
|
||||
self.text = text
|
||||
|
||||
def render(self) -> RenderableType:
|
||||
def render(self, styles: Styles) -> RenderableType:
|
||||
return Padding(f"{self.text}", pad=(0, 1))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user