Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dialog): add the ability to align the content of md-dialog-actions #2557

Merged
merged 3 commits into from
Jan 13, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 6, 2017

Adds the align attribute, which can be set to end or middle, that allows users to align the content of the md-dialog-actions.

Fixes #2483.

Adds the `align` attribute, which can be set to `end` or `middle`, that allows users to align the content of the `md-dialog-actions`.

Fixes angular#2483.
@crisbeto crisbeto requested a review from jelbourn January 6, 2017 23:01
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 6, 2017
@@ -37,7 +37,7 @@ A reference to the dialog created by the MdDialog `open` method.
| `md-dialog-title` | Marks the title of the dialog.
| `md-dialog-content` | Scrollable content of the dialog.
| `md-dialog-close` | When added to a `button`, makes the element act as a close button for the dialog.
| `md-dialog-actions` | Wrapper for the set of actions at the bottom of a dialog. Typically contains buttons.
| `md-dialog-actions` | Wrapper for the set of actions at the bottom of a dialog. Typically contains buttons. The element's content can be aligned via the `align` attribute either to the `middle` or the `end`. |
Copy link
Member

Choose a reason for hiding this comment

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

Should be center rather than middle.

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed.


&:last-child {
// If the actions are the last element in a dialog, we need to pull them down
// over the dialog padding, in order to avoid the action's padding stacking
// with the dialog's.
margin-bottom: -$md-dialog-padding;
}

&[align='end'] {
Copy link
Member

Choose a reason for hiding this comment

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

If someone sets align with a binding ([align]="buttonAlignment")` does it still apply this attribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does. That's what I did in the playground/demo app.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 13, 2017
@tinayuangao tinayuangao merged commit e18ab5d into angular:master Jan 13, 2017
@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 6, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: add align attribute to md-dialog-actions
4 participants