from textual.containers import Container from textual.app import ComposeResult from textual.widgets import Static, Button MESSAGE = ''' Be excellent to each other! Made with :red_heart: by Panki [@click="app.open_link('https://tty0.social/@panki')"]Mastodon:[/] tty0.social/@panki [@click="app.open_link('https://git.theresno.cloud/panki/bingo-cli')"]Source:[/] git.theresno.cloud/panki/bingo-cli Built using [@click="app.open_link('https://textual.textualize.io/')"]Textual[/] ''' class Sidebar(Container): '''Class to represent the sidebar''' def compose(self) -> ComposeResult: '''Create the widgets that make up the sidebar''' yield Static('CCC Bingo', classes='title') yield Static(MESSAGE, classes='message') self.button = Button('< Back', variant='primary', classes='btn_sidebar') self.button.disabled = True yield self.button def on_button_pressed(self, event: Button.Pressed) -> None: '''Closes the sidebar''' self.app.action_toggle_sidebar()