Confirmation dialog styles
This commit is contained in:
parent
26c117e8d1
commit
6adb38a61d
@ -1,5 +1,5 @@
|
||||
<section class="dialog">
|
||||
<div [class.primary]="isDeleteAction" class="dialog-header heading-l">
|
||||
<div [class.warn]="isDeleteAction" class="dialog-header heading-l">
|
||||
{{ config.title }}
|
||||
</div>
|
||||
|
||||
@ -14,16 +14,21 @@
|
||||
</div>
|
||||
|
||||
<div class="dialog-actions">
|
||||
<button (click)="confirm(1)" [disabled]="config.requireInput && confirmationDoesNotMatch()" color="primary" mat-flat-button>
|
||||
<button
|
||||
(click)="confirm(1)"
|
||||
[disabled]="config.requireInput && confirmationDoesNotMatch()"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
>
|
||||
{{ config.confirmationText }}
|
||||
</button>
|
||||
|
||||
<button
|
||||
(click)="confirm(2)"
|
||||
*ngIf="config.alternativeConfirmationText"
|
||||
[disabled]="config.requireInput && confirmationDoesNotMatch()"
|
||||
color="primary"
|
||||
mat-flat-button
|
||||
*ngIf="config.alternativeConfirmationText"
|
||||
>
|
||||
{{ config.alternativeConfirmationText }}
|
||||
</button>
|
||||
|
||||
@ -0,0 +1,3 @@
|
||||
.warn {
|
||||
color: var(--iqser-red-1);
|
||||
}
|
||||
@ -3,11 +3,11 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
|
||||
export type TitleColor = 'default' | 'primary';
|
||||
export type TitleColor = 'default' | 'warn';
|
||||
|
||||
export enum TitleColors {
|
||||
DEFAULT = 'default',
|
||||
PRIMARY = 'primary',
|
||||
WARN = 'warn',
|
||||
}
|
||||
|
||||
export class ConfirmationDialogInput {
|
||||
@ -57,7 +57,7 @@ export class ConfirmationDialogComponent {
|
||||
}
|
||||
|
||||
get isDeleteAction(): boolean {
|
||||
return this.config?.titleColor === TitleColors.PRIMARY;
|
||||
return this.config?.titleColor === TitleColors.WARN;
|
||||
}
|
||||
|
||||
@HostListener('window:keyup.enter')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user