From 210e39488f4e01e68fa8dcefbcb0d75579058cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Thu, 26 Jan 2023 10:56:32 +0000 Subject: [PATCH] Add template for widget reference. --- docs/widgets/_template.md | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/widgets/_template.md diff --git a/docs/widgets/_template.md b/docs/widgets/_template.md new file mode 100644 index 000000000..1e8c6f972 --- /dev/null +++ b/docs/widgets/_template.md @@ -0,0 +1,64 @@ +# Widget + +Widget description. + +- [ ] Focusable +- [ ] Container + + +## Example + +Example app showing the widget: + +=== "Output" + + ```{.textual path="docs/examples/widgets/checkbox.py"} + ``` + +=== "checkbox.py" + + ```python + --8<-- "docs/examples/widgets/checkbox.py" + ``` + +=== "checkbox.css" + + ```sass + --8<-- "docs/examples/widgets/checkbox.css" + ``` + + +## Reactive attributes + + +## Bindings + +The WIDGET widget defines directly the following bindings: + +::: textual.widgets.WIDGET.BINDINGS + options: + show_root_heading: false + show_root_toc_entry: false + + +## Component classes + +The WIDGET widget provides the following component classes: + +::: textual.widget.WIDGET.COMPONENT_CLASSES + options: + show_root_heading: false + show_root_toc_entry: false + + +## Additional notes + +- Did you know this? +- Another pro tip. + + +## See also + +- [WIDGET](../api/WIDGET.md) code reference. +- Another related API. +- Something else useful.