mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Pass Rich Style object into Textual render method
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
from rich.text import Text
|
||||
from rich.style import Style
|
||||
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.css.styles import Styles
|
||||
from textual.widget import Widget
|
||||
from textual.widgets import Static
|
||||
|
||||
|
||||
class Thing(Widget):
|
||||
def render(self, styles: Styles):
|
||||
def render(self, style: Style):
|
||||
return "Hello, 3434 World.\n[b]Lorem impsum."
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user