Skip to content

Commit

Permalink
[ACS-7980] fix style (#9798)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaragruszka authored and VitoAlbano committed Jul 9, 2024
1 parent 55add1f commit d3325a0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
35 changes: 26 additions & 9 deletions lib/core/src/lib/dialogs/confirm-dialog/confirm.dialog.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
<h1 mat-dialog-title data-automation-id="adf-confirm-dialog-title">{{ title | translate }}</h1>
<mat-dialog-content>
<div class="adf-confirm-dialog-content">
<p *ngIf="!htmlContent; else cutomContent" data-automation-id="adf-confirm-dialog-base-message">
<p *ngIf="!htmlContent; else customContent" data-automation-id="adf-confirm-dialog-base-message">
{{ message | translate }}
</p>
<ng-template #cutomContent>
<span [innerHTML]="sanitizedHtmlContent()" data-automation-id="adf-confirm-dialog-custom-content">
</span>
<ng-template #customContent>
<span [innerHTML]="sanitizedHtmlContent()" data-automation-id="adf-confirm-dialog-custom-content"></span>
</ng-template>
</div>
</mat-dialog-content>
<mat-dialog-actions>
<span class="adf-dialog-spacer" data-automation-id="adf-confirm-dialog-spacer"></span>
<button id="adf-confirm-accept" class="adf-confirm-dialog-button" mat-button color="primary" data-automation-id="adf-confirm-dialog-confirmation"
[mat-dialog-close]="true">{{ yesLabel | translate }}</button>
<button id="adf-confirm-all" class="adf-confirm-dialog-button" mat-button *ngIf="thirdOptionLabel" [mat-dialog-close]="thirdOptionLabel" data-automation-id="adf-confirm-dialog-confirm-all">{{ thirdOptionLabel | translate }}</button>
<button id="adf-confirm-cancel" class="adf-confirm-dialog-button" mat-button [mat-dialog-close]="false" data-automation-id="adf-confirm-dialog-reject"
cdkFocusInitial>{{ noLabel | translate }}</button>
<button id="adf-confirm-accept"
class="adf-confirm-dialog-button"
mat-button
color="primary"
data-automation-id="adf-confirm-dialog-confirmation"
[mat-dialog-close]="true">
{{ yesLabel | translate }}
</button>
<button *ngIf="thirdOptionLabel"
id="adf-confirm-all"
class="adf-confirm-dialog-button"
mat-button
[mat-dialog-close]="thirdOptionLabel"
data-automation-id="adf-confirm-dialog-confirm-all">{{ thirdOptionLabel | translate }}
</button>
<button id="adf-confirm-cancel"
class="adf-confirm-dialog-button"
mat-button
[mat-dialog-close]="false"
data-automation-id="adf-confirm-dialog-reject"
cdkFocusInitial>
{{ noLabel | translate }}
</button>
</mat-dialog-actions>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
}

& .adf-confirm-dialog-content {
margin: 0 -24px;
width: 100%;
}
}
4 changes: 1 addition & 3 deletions lib/core/src/lib/dialogs/confirm-dialog/confirm.dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import { Component, Inject, ViewEncapsulation, SecurityContext } from '@angular/core';
import { Component, Inject, SecurityContext, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { DomSanitizer } from '@angular/platform-browser';

Expand All @@ -36,7 +36,6 @@ export interface ConfirmDialogComponentProps {
encapsulation: ViewEncapsulation.None
})
export class ConfirmDialogComponent {

title: string;
message: string;
yesLabel: string;
Expand All @@ -57,5 +56,4 @@ export class ConfirmDialogComponent {
sanitizedHtmlContent(): string {
return this.sanitizer.sanitize(SecurityContext.HTML, this.htmlContent);
}

}

0 comments on commit d3325a0

Please sign in to comment.