From 316faf9e45105675bd6bc1dae458c61ce76ad4cb Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Thu, 23 Feb 2023 15:31:32 +0000 Subject: [PATCH] Add width reference documentation for radio set --- docs/widgets/radioset.md | 37 +++++++++++++++++++++++++++++++++++++ mkdocs-nav.yml | 1 + 2 files changed, 38 insertions(+) create mode 100644 docs/widgets/radioset.md diff --git a/docs/widgets/radioset.md b/docs/widgets/radioset.md new file mode 100644 index 000000000..7b1cc27dc --- /dev/null +++ b/docs/widgets/radioset.md @@ -0,0 +1,37 @@ +# RadioSet + +A container widget that groups [`RadioButton`](./radiobutton.md)s together. + +- [ ] Focusable +- [x] Container + +## Example + +The example below shows two radio sets, one built using a collection of +[radio buttons](./radiobutton.md), the other a collection of simple strings. + +=== "Output" + + ```{.textual path="docs/examples/widgets/radio_set.py"} + ``` + +=== "radio_set.py" + + ```python + --8<-- "docs/examples/widgets/radio_set.py" + ``` + +=== "radio_set.css" + + ```sass + --8<-- "docs/examples/widgets/radio_set.css" + ``` + +## Messages + +### ::: textual.widgets.RadioSet.Changed + +## See Also + +- [RadioSet](../api/radioset.md) code reference +- [RadioButton](./radiobutton.md) diff --git a/mkdocs-nav.yml b/mkdocs-nav.yml index c2a7f83ab..f02c74cf0 100644 --- a/mkdocs-nav.yml +++ b/mkdocs-nav.yml @@ -135,6 +135,7 @@ nav: - "widgets/markdown.md" - "widgets/placeholder.md" - "widgets/radiobutton.md" + - "widgets/radioset.md" - "widgets/static.md" - "widgets/switch.md" - "widgets/text_log.md"