From b246278233549a0c52157758bafbc7cf0c6cd05e Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Wed, 5 Oct 2022 09:26:39 +0100 Subject: [PATCH] tweaks and fixes --- docs/widgets/button.md | 3 +-- docs/widgets/footer.md | 4 +--- docs/widgets/header.md | 4 +--- docs/widgets/input.md | 10 ++++------ docs/widgets/static.md | 4 +--- mkdocs.yml | 1 - 6 files changed, 8 insertions(+), 18 deletions(-) diff --git a/docs/widgets/button.md b/docs/widgets/button.md index 2b1008e85..1387ffdf2 100644 --- a/docs/widgets/button.md +++ b/docs/widgets/button.md @@ -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. | diff --git a/docs/widgets/footer.md b/docs/widgets/footer.md index c733decb1..01717b225 100644 --- a/docs/widgets/footer.md +++ b/docs/widgets/footer.md @@ -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 diff --git a/docs/widgets/header.md b/docs/widgets/header.md index b66e9f23c..685ce04ee 100644 --- a/docs/widgets/header.md +++ b/docs/widgets/header.md @@ -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 diff --git a/docs/widgets/input.md b/docs/widgets/input.md index 9c3580633..e98d27b23 100644 --- a/docs/widgets/input.md +++ b/docs/widgets/input.md @@ -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. | diff --git a/docs/widgets/static.md b/docs/widgets/static.md index 27121bda7..3ed68ac95 100644 --- a/docs/widgets/static.md +++ b/docs/widgets/static.md @@ -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 diff --git a/mkdocs.yml b/mkdocs.yml index 3db977e5c..31e891769 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -93,7 +93,6 @@ nav: - "widgets/index.md" - "widgets/input.md" - "widgets/static.md" - - "widgets/input.md" - "widgets/tree_control.md" - Reference: - "reference/app.md"