Update local styles sandbox to use new get_child

This commit is contained in:
Darren Burns
2022-02-22 11:37:50 +00:00
parent 2b304cc9f7
commit b91d3bd949

View File

@@ -20,15 +20,15 @@ class BasicApp(App):
await self.dispatch_key(event)
def key_a(self) -> None:
footer = self.get_child("#footer")
footer = self.get_child("footer")
footer.set_styles(text="on magenta")
def key_b(self) -> None:
footer = self.get_child("#footer")
footer = self.get_child("footer")
footer.set_styles("text: on green")
def key_c(self) -> None:
header = self.get_child("#header")
header = self.get_child("header")
header.toggle_class("-highlight")
self.log(header.styles)