feat(dialog): set default actions alignment with injection token
Feature Description
I want the dialog actions to be aligned to the right by default. Currently this is not part of the MatDialogConfig, so it cannot be set via the MAT_DIALOG_DEFAULT_OPTIONS injection token. It can only be achieved by setting the align input for each usage of the mat-dialog-actions component:
<mat-dialog-actions align="end">
</mat-dialog-actions>
My suggestion is to add an optional alignActions property to the MatDialogConfig interface to control the default alignment.
Use Case
The actions alignment should be changeable at a single point for the whole application, so it is easier to maintain in larger code bases.
Since v19, this can be achieved with the overrides mixin:
@use '@angular/material' as mat;
:root {
@include mat.dialog-overrides((
actions-alignment: flex-end,
));
}
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.