Merge pull request #540 from Textualize/docs-structure

Docs Refresh
This commit is contained in:
Will McGugan
2022-05-27 12:01:25 +01:00
committed by GitHub
51 changed files with 587 additions and 173 deletions

View File

@@ -56,14 +56,14 @@ lorem_long_text = Text.from_markup(lorem * 2)
class TweetHeader(Widget):
def render(self, style: Style) -> RenderableType:
def render(self) -> RenderableType:
return Text("Lorem Impsum", justify="center")
class TweetBody(Widget):
short_lorem = Reactive[bool](False)
def render(self, style: Style) -> Text:
def render(self) -> Text:
return lorem_short_text if self.short_lorem else lorem_long_text
@@ -72,22 +72,22 @@ class Tweet(Widget):
class OptionItem(Widget):
def render(self, style: Style) -> Text:
def render(self) -> Text:
return Text("Option")
class Error(Widget):
def render(self, style: Style) -> Text:
def render(self) -> Text:
return Text("This is an error message", justify="center")
class Warning(Widget):
def render(self, style: Style) -> Text:
def render(self) -> Text:
return Text("This is a warning message", justify="center")
class Success(Widget):
def render(self, style: Style) -> Text:
def render(self) -> Text:
return Text("This is a success message", justify="center")