mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
ws
This commit is contained in:
31
examples/basic.py
Normal file
31
examples/basic.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from textual.app import App
|
||||
from textual.widgets import Placeholder
|
||||
|
||||
|
||||
class BasicApp(App):
|
||||
"""Demonstrates smooth animation. Press 'b' to see it in action."""
|
||||
|
||||
css = """
|
||||
|
||||
App > View {
|
||||
layout: dock
|
||||
}
|
||||
|
||||
#widget1 {
|
||||
edge: top
|
||||
}
|
||||
|
||||
#widget2 {
|
||||
|
||||
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
async def on_mount(self) -> None:
|
||||
"""Build layout here."""
|
||||
|
||||
await self.view.mount(widget1=Placeholder(), widget2=Placeholder())
|
||||
|
||||
|
||||
SmoothApp.run(log="textual.log")
|
||||
Reference in New Issue
Block a user