mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
@grafana/ui: Update RadioButtonGroup documentation (#23143)
* Add "When to use" info to RadioButtonGroup.mdx * Clarify more clearly when to use 'Select' instead * Update RadioButtonGroup.mdx Add line explaining why we want select for more than four options instead of a radio button group * Update RadioButtonGroup.mdx remove part about when elements are triggering changes. Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
This commit is contained in:
parent
c066c6047e
commit
f1386c7892
@ -5,9 +5,13 @@ import { RadioButtonGroup } from "./RadioButtonGroup";
|
||||
|
||||
# RadioButtonGroup
|
||||
|
||||
`RadioButtonGroup` is used for selecting single value from multiple options.
|
||||
`RadioButtonGroup` is used to select a single value from multiple mutually exclusive options.
|
||||
|
||||
Use `RadioButtonGroup` if there are up to four options available. Otherwise use Select component.
|
||||
### When to use
|
||||
|
||||
Use `RadioButtonGroup` for mutually exclusive selections if there are up to four options available. This is because the `RadioButtonGroup` cannot have more than one row and should still accommodate small resolutions. For a mutually exclusive selection of more than four options, use `Select` component.
|
||||
|
||||
Radio buttons can only exist in this type of group. If you want one single option, it's better to use `Switch` instead. To offer multiple choices within the same group or context which are not mutually exclusive, use `Checkbox` instead.
|
||||
|
||||
### Usage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user