Skip to content

Conversation

@jelbourn
Copy link
Member

Initial overview docs for button, button-toggle, card, checkbox, and dialog. Will need more examples added later.

cc @topherfangio @devversion if you want to do something similar for your components

@jelbourn jelbourn added docs This issue is related to documentation pr: needs review labels Dec 20, 2016
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 20, 2016
| `md-dialog-title` | \[Attr] Dialog title, applied to a heading element (e.g., `<h1>`, `<h2>`)|
| `<md-dialog-content>` | Primary scrollable content of the dialog |
| `<md-dialog-actions>` | Container for action buttons at the bottom of the dialog |
| `md-dialog-close` | \[Attr] Added to a `<button>` to make the button close the on click |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed "dialog" here - "...to make the button close the dialog on click".

@devversion
Copy link
Member

@jelbourn Yeah I will do the docs for the slide-toggle and toolbar.

@@ -0,0 +1,21 @@
Buttons toggles aregroups of buttons that can be toggled on and off. They can be configured to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button toggles are groups...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think "buttons toggles" is a weird way to pluralize it, it also says "button toggles" elsewhere in this same readme

@@ -0,0 +1,21 @@
Buttons toggles aregroups of buttons that can be toggled on and off. They can be configured to
behave as checkboxes or as radio buttons. Button toggles are always part of a
`md-button-toggle-group`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true, you could have a single button that can toggle on or off. The code says the toggle group is optional: https://github.com/angular/material2/blob/master/src/lib/button-toggle/button-toggle.ts#L299

<!-- example(button-toggle-overview) -->

### Exclusive selection vs. multiple selection
By default, `md-button-toggle-group` acts like a radio-button group- only one item can be selected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

radio-button-group (also surround with backticks)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to refer to the general idea of a radio-button group vs. md-radio-group specifically.


### 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-radio-group` will reflect the value of the selected button and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

md-button-toggle-group?

`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-radio-group` does not have a value, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

md-button-toggle-group

@jelbourn
Copy link
Member Author

Good catches- comments addressed.

@mmalerba
Copy link
Contributor

lgtm

@jelbourn jelbourn added the action: merge The PR is ready for merge by the caretaker label Dec 20, 2016
@jelbourn jelbourn merged commit 792c7c2 into angular:master Dec 20, 2016
@andrewseguin
Copy link
Contributor

This had an funny commit in snackbar-ref that is breaking the tests. Check out #2298 for the removal of the line.

@jelbourn jelbourn deleted the docs-overviews branch September 13, 2017 04:35
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement docs This issue is related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants