From 9f2e227b67fbcd99e3826bd65f104280a4c18c99 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Mon, 14 Feb 2022 17:26:20 +0300 Subject: [PATCH] Icon customization properties added to confirmation popup. Issue #11511 --- docs/en/UI/Angular/Confirmation-Service.md | 6 +++- .../confirmation/confirmation.component.html | 7 +++-- .../confirmation/confirmation.component.ts | 30 +++++++++++++------ .../src/lib/models/confirmation.ts | 3 ++ 4 files changed, 34 insertions(+), 12 deletions(-) diff --git a/docs/en/UI/Angular/Confirmation-Service.md b/docs/en/UI/Angular/Confirmation-Service.md index ef48332580..6a869fa317 100644 --- a/docs/en/UI/Angular/Confirmation-Service.md +++ b/docs/en/UI/Angular/Confirmation-Service.md @@ -75,7 +75,9 @@ const options: Partial = { yesText: 'Confirm', messageLocalizationParams: ['Demo'], titleLocalizationParams: [], -}; + icon: 'fa fa-info-circle', + iconTemplate : '' +} this.confirmation.warn( 'AbpIdentity::RoleDeletionConfirmationMessage', @@ -91,6 +93,8 @@ this.confirmation.warn( - `yesText` is the text of the confirmation button. A localization key or localization object can be passed. Default value is `AbpUi::Yes`. - `messageLocalizationParams` is the interpolation parameters for the localization of the message. - `titleLocalizationParams` is the interpolation parameters for the localization of the title. +- `icon` is the custom class of the icon. Default value is `undefined`. +- `iconTemplate` is the template for icon. Default value is `undefined`. With the options above, the confirmation popup looks like this: diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/confirmation/confirmation.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/confirmation/confirmation.component.html index 47c555a16b..735055971d 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/confirmation/confirmation.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/confirmation/confirmation.component.html @@ -4,8 +4,11 @@ (click)="data.options?.dismissible ? close(dismiss) : null" >
-
- +
+
+ + +

} export interface DialogData {