mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Update the Button docs to mention ButtonVariant
I'm not 100% sure how to get this into the docs as I'd like, and it seems we've moved the API docs around a lot in respect to widgets, recently (I'm aware of this but aren't sure what the new layout is yet). This at least starts to get things into the right place.
This commit is contained in:
@@ -31,11 +31,11 @@ Clicking any of the non-disabled buttons in the example app below will result in
|
||||
|
||||
## Reactive Attributes
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ---------- | ------ | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `label` | `str` | `""` | The text that appears inside the button. |
|
||||
| `variant` | `str` | `"default"` | Semantic styling variant. One of `default`, `primary`, `success`, `warning`, `error`. |
|
||||
| `disabled` | `bool` | `False` | Whether the button is disabled or not. Disabled buttons cannot be focused or clicked, and are styled in a way that suggests this. |
|
||||
| Name | Type | Default | Description |
|
||||
|------------|-----------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `label` | `str` | `""` | The text that appears inside the button. |
|
||||
| `variant` | `ButtonVariant` | `"default"` | Semantic styling variant. One of `default`, `primary`, `success`, `warning`, `error`. |
|
||||
| `disabled` | `bool` | `False` | Whether the button is disabled or not. Disabled buttons cannot be focused or clicked, and are styled in a way that suggests this. |
|
||||
|
||||
## Messages
|
||||
|
||||
@@ -51,3 +51,8 @@ Clicking any of the non-disabled buttons in the example app below will result in
|
||||
::: textual.widgets.Button
|
||||
options:
|
||||
heading_level: 2
|
||||
|
||||
::: textual.widgets.button
|
||||
options:
|
||||
show_root_heading: true
|
||||
show_root_toc_entry: true
|
||||
|
||||
Reference in New Issue
Block a user