Files
textual/tests/snapshot_tests/snapshot_apps/auto_width_input.py
Will McGugan e446695684 snapshot fix
2023-01-31 12:53:32 +01:00

23 lines
487 B
Python

from textual.app import App, ComposeResult
from textual.containers import Vertical
from textual.widgets import Header, Footer, Label, Input
class InputWidthAutoApp(App[None]):
CSS = """
Input.auto {
width: auto;
max-width: 100%;
}
"""
def compose(self) -> ComposeResult:
yield Header()
yield Input(placeholder="This has auto width", classes="auto")
yield Footer()
if __name__ == "__main__":
InputWidthAutoApp().run()