Files
textual/docs/examples/styles/link_style_hover.py
Rodrigo Girão Serrão d993cce505 Rename link-hover-* rules to link-*-hover. (#3736)
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-11-29 14:09:58 +00:00

30 lines
761 B
Python

from textual.app import App
from textual.widgets import Label
class LinkHoverStyleApp(App):
CSS_PATH = "link_style_hover.tcss"
def compose(self):
yield Label(
"Visit the [link=https://textualize.io]Textualize[/link] website.",
id="lbl1", # (1)!
)
yield Label(
"Click [@click=app.bell]here[/] for the bell sound.",
id="lbl2", # (2)!
)
yield Label(
"You can also click [@click=app.bell]here[/] for the bell sound.",
id="lbl3", # (3)!
)
yield Label(
"[@click=app.quit]Exit this application.[/]",
id="lbl4", # (4)!
)
if __name__ == "__main__":
app = LinkHoverStyleApp()
app.run()