Correct what is imported in an example

The main code in the example creates a `Button` from a `Static`, but the
import is importing a `Widget`. This commit makes the example code make more
sense.
This commit is contained in:
Dave Pearson
2022-10-14 08:48:06 +01:00
parent d324f1cd56
commit 34e5d53cb3

View File

@@ -187,7 +187,7 @@ Let's look at the selectors supported by Textual CSS.
The _type_ selector matches the name of the (Python) class. For example, the following widget can be matched with a `Button` selector: The _type_ selector matches the name of the (Python) class. For example, the following widget can be matched with a `Button` selector:
```python ```python
from textual.widgets import Widget from textual.widgets import Static
class Button(Static): class Button(Static):
pass pass