-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(dialog): add the ability to align the content of md-dialog-actions #2557
Conversation
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.
@@ -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`. | |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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'] { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds the
align
attribute, which can be set toend
ormiddle
, that allows users to align the content of themd-dialog-actions
.Fixes #2483.