Skip to content

Instantly share code, notes, and snippets.

@RonnyPfannschmidt
Created July 28, 2021 08:50
Show Gist options
  • Save RonnyPfannschmidt/fa6f46b476887c2516f6b6febc839c02 to your computer and use it in GitHub Desktop.
Save RonnyPfannschmidt/fa6f46b476887c2516f6b6febc839c02 to your computer and use it in GitHub Desktop.
initial wild brainstorm for components that textual could provide
from ... import ...
class MyComonent(Component)
close = Text.as_part("close"):
async def on__close__click(self, ...):
await self.close()
# or as prepared component
class MyOtherComponent(Component):
close = CloseButton.as_part() # has prepared on click handler that closes the parent,, has i18n text for close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment