Skip to content

Commit

Permalink
docs(form): add usage guide for checkbox and radio
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Dec 15, 2017
1 parent 7bf0ee5 commit 8ad34c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Checkbox/Checkbox.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### Minimal usage

Checkboxes are used when there are lists of options and the user may select any number of choices, including zero, one, or several. In other words, each checkbox is independent of all other checkboxes in the list, so checking one box doesn't uncheck the others.

A stand-alone checkbox is used for a single option that the user can turn on or off.

<a href="https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/" target="_blank">Reference</a>

```
<Box tag="fieldset" between={2}>
<Text bold size="medium">
Expand Down
6 changes: 6 additions & 0 deletions src/components/Radio/Radio.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Minimal usage

Radio buttons are used when there is a list of two or more options that are mutually exclusive and the user must select exactly one choice. In other words, clicking a non-selected radio button will deselect whatever other button was previously selected in the list.

<a href="https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/" target="_blank">Reference</a>

```
initialState = {
choice: undefined
Expand Down

0 comments on commit 8ad34c4

Please sign in to comment.