From 792c7c2e298fd4dc094a579fd1ebe5e3c899e4d2 Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Tue, 20 Dec 2016 10:49:27 -0800 Subject: [PATCH] docs: initial overview docs for button - dialog (#2290) * docs: initial overview docs for button - dialog * Corrections from proofreading * Fix improper plural --- src/lib/button-toggle/OVERVIEW.md | 22 +++++++++++++++ src/lib/button/OVERVIEW.md | 25 +++++++++++++++++ src/lib/card/OVERVIEW.md | 45 ++++++++++++++++++++++++++++++ src/lib/checkbox/OVERVIEW.md | 28 +++++++++++++++++++ src/lib/dialog/OVERVIEW.md | 39 ++++++++++++++++++++++++++ src/lib/dialog/README.md | 1 - src/lib/snack-bar/snack-bar-ref.ts | 2 +- 7 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 src/lib/button-toggle/OVERVIEW.md create mode 100644 src/lib/button/OVERVIEW.md create mode 100644 src/lib/card/OVERVIEW.md create mode 100644 src/lib/checkbox/OVERVIEW.md create mode 100644 src/lib/dialog/OVERVIEW.md diff --git a/src/lib/button-toggle/OVERVIEW.md b/src/lib/button-toggle/OVERVIEW.md new file mode 100644 index 00000000000..5bd6507c7ac --- /dev/null +++ b/src/lib/button-toggle/OVERVIEW.md @@ -0,0 +1,22 @@ +Button-toggles are on/off toggles with the appearance of a button. These toggles can be configured +to behave as either radio-buttons or checkboxes. While they can be standalone, they are typically +part of a `md-button-toggle-group`. + + + + +### Exclusive selection vs. multiple selection +By default, `md-button-toggle-group` acts like a radio-button group- only one item can be selected. +In this mode, the `value` of the `md-button-toggle-group` will reflect the value of the selected +button and `ngModel` is supported. + +Adding the `multiple` attribute allows multiple items to be selected (checkbox behavior). In this +mode the values of the the toggles are not used, the `md-button-toggle-group` does not have a value, +and `ngModel` is not supported. + +### Accessibility +The button-toggles will present themselves as either checkboxes or radio-buttons based on the +presence of the `multiple` attribute. + +### Orientation +The button-toggles can be rendered in a vertical orientation by adding the `vertical` attribute. diff --git a/src/lib/button/OVERVIEW.md b/src/lib/button/OVERVIEW.md new file mode 100644 index 00000000000..8cd5feb0787 --- /dev/null +++ b/src/lib/button/OVERVIEW.md @@ -0,0 +1,25 @@ +Angular Material buttons are native `