diff --git a/docs/examples/widgets/placeholder.py b/docs/examples/widgets/placeholder.py index d47cadeca..0c6499842 100644 --- a/docs/examples/widgets/placeholder.py +++ b/docs/examples/widgets/placeholder.py @@ -10,24 +10,24 @@ class PlaceholderApp(App): def compose(self) -> ComposeResult: yield Vertical( Container( - Placeholder(label="This is a custom label for p1.", id="p1"), - Placeholder(label="Placeholder p2 here!", id="p2"), + Placeholder("This is a custom label for p1.", id="p1"), + Placeholder("Placeholder p2 here!", id="p2"), Placeholder(id="p3"), Placeholder(id="p4"), Placeholder(id="p5"), Placeholder(), Horizontal( - Placeholder("size", id="col1"), - Placeholder("text", id="col2"), - Placeholder("size", id="col3"), + Placeholder(variant="size", id="col1"), + Placeholder(variant="text", id="col2"), + Placeholder(variant="size", id="col3"), id="c1", ), id="bot" ), Container( - Placeholder("text", id="left"), - Placeholder("size", id="topright"), - Placeholder("text", id="botright"), + Placeholder(variant="text", id="left"), + Placeholder(variant="size", id="topright"), + Placeholder(variant="text", id="botright"), id="top", ), id="content", diff --git a/tests/test_placeholder.py b/tests/test_placeholder.py index 74fe2e40f..6bc7a1e04 100644 --- a/tests/test_placeholder.py +++ b/tests/test_placeholder.py @@ -6,7 +6,7 @@ from textual.widgets._placeholder import InvalidPlaceholderVariant def test_invalid_placeholder_variant(): with pytest.raises(InvalidPlaceholderVariant): - Placeholder("this is clearly not a valid variant!") + Placeholder(variant="this is clearly not a valid variant!") def test_invalid_reactive_variant_change():