Update docs accordingly.

This commit is contained in:
Rodrigo Girão Serrão
2023-02-08 10:53:51 +00:00
parent bd719e057f
commit e5e7c08afe
3 changed files with 4 additions and 4 deletions

View File

@@ -25,8 +25,8 @@ class ColorButton(Static):
self.styles.border = ("tall", self.color)
async def on_click(self) -> None:
# The emit method sends an event to a widget's parent
await self.emit(self.Selected(self, self.color))
# The post_message method sends an event to be handled in the DOM
await self.post_message(self.Selected(self, self.color))
def render(self) -> str:
return str(self.color)