tweaks and fixes

This commit is contained in:
Will McGugan
2022-10-05 09:26:39 +01:00
parent d98d889dd1
commit b246278233
6 changed files with 8 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
# Button
## Description
A simple button widget which can be pressed using a mouse click or by pressing ++return++
when it has focus.
@@ -33,7 +32,7 @@ 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. |

View File

@@ -1,7 +1,5 @@
# Footer
## Description
A simple footer widget which is docked to the bottom of its parent container. Displays
available keybindings for the currently focused widget.
@@ -27,7 +25,7 @@ widget. Notice how the `Footer` automatically displays the keybind.
## Reactive Attributes
| Name | Type | Default | Description |
|-----------------|-------|---------|-----------------------------------------------------------------------------------------------------------|
| --------------- | ----- | ------- | --------------------------------------------------------------------------------------------------------- |
| `highlight_key` | `str` | `None` | Stores the currently highlighted key. This is typically the key the cursor is hovered over in the footer. |
## Messages

View File

@@ -1,7 +1,5 @@
# Header
## Description
A simple header widget which docks itself to the top of the parent container.
- [ ] Focusable
@@ -25,7 +23,7 @@ The example below shows an app with a `Header`.
## Reactive Attributes
| Name | Type | Default | Description |
|--------|--------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------ | ------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `tall` | `bool` | `True` | Whether the `Header` widget is displayed as tall or not. The tall variant is 3 cells tall by default. The non-tall variant is a single cell tall. This can be toggled by clicking on the header. |
## Messages

View File

@@ -1,7 +1,5 @@
# Input
## Description
A single-line text input widget.
- [x] Focusable
@@ -13,7 +11,7 @@ The example below shows how you might create a simple form using two `Input` wid
=== "Output"
```{.textual path="docs/examples/widgets/input.py"}
```{.textual path="docs/examples/widgets/input.py" press="tab,D,a,r,r,e,n"}
```
=== "input.py"
@@ -25,7 +23,7 @@ The example below shows how you might create a simple form using two `Input` wid
## Reactive Attributes
| Name | Type | Default | Description |
|-------------------|--------|---------|-----------------------------------------------------------------|
| ----------------- | ------ | ------- | --------------------------------------------------------------- |
| `cursor_blink` | `bool` | `True` | True if cursor blinking is enabled. |
| `value` | `str` | `""` | The value currently in the text input. |
| `cursor_position` | `int` | `0` | The index of the cursor in the value string. |
@@ -43,7 +41,7 @@ The `Input.Changed` message is sent when the value in the text input changes.
#### Attributes
| attribute | type | purpose |
|-----------|-------|----------------------------------|
| --------- | ----- | -------------------------------- |
| `value` | `str` | The new value in the text input. |
@@ -56,7 +54,7 @@ The `Input.Submitted` message is sent when you press ++enter++ with the text fie
#### Attributes
| attribute | type | purpose |
|-----------|-------|----------------------------------|
| --------- | ----- | -------------------------------- |
| `value` | `str` | The new value in the text input. |

View File

@@ -1,8 +1,6 @@
# Static
## Description
A widget which displays a static renderable content.
A widget which displays static content.
Can be used for simple text labels, but can also contain more complex Rich renderables.
- [ ] Focusable