From 73c192ad18c191b64d944fabe2e0be1ab1e40ad1 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 4 Mar 2020 14:14:27 -0500 Subject: [PATCH] update jslib and swal2 styles --- jslib | 2 +- package.json | 2 +- src/scss/plugins.scss | 15 ++++++++++----- src/services/webPlatformUtils.service.ts | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/jslib b/jslib index da9b9b438c..44b86f5dd0 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit da9b9b438c4028b16f0d02d9e83477dce9378a16 +Subproject commit 44b86f5dd028271059b70a00d7878fbb1a06023f diff --git a/package.json b/package.json index 8d2de785e7..c0c2ca3154 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "popper.js": "1.14.4", "qrious": "4.0.2", "rxjs": "6.3.3", - "sweetalert2": "^9.8.1", + "sweetalert2": "9.8.1", "web-animations-js": "2.3.1", "webcrypto-shim": "0.1.4", "whatwg-fetch": "3.0.0", diff --git a/src/scss/plugins.scss b/src/scss/plugins.scss index ab9046a89c..265be8869a 100644 --- a/src/scss/plugins.scss +++ b/src/scss/plugins.scss @@ -94,15 +94,19 @@ $fa-font-path: "~font-awesome/fonts"; } .swal2-popup { - padding: 0; + padding: 15px 0 0; background-color: $modal-content-bg; color: $body-color; border: $modal-content-border-width solid #9a9a9a; @include border-radius($modal-content-border-radius); width: 34em; // slightly bigger than the hardcoded 478px in v1. + .swal2-header { + padding: 0 15px; + } + .swal2-icon { - margin: 15px auto 0 auto; + margin: 0 auto; width: auto; height: auto; border: none; @@ -121,7 +125,7 @@ $fa-font-path: "~font-awesome/fonts"; } .swal2-title { - padding: 10px 10px 15px 10px; + padding: 10px 0 15px; margin: 0; font-size: $font-size-lg; color: $body-color; @@ -130,10 +134,11 @@ $fa-font-path: "~font-awesome/fonts"; .swal2-content { font-size: $font-size-base; color: $body-color; + padding: 0 15px 15px; } .swal2-actions { - padding: 15px 10px 10px 10px; + padding: 15px; margin: 0; background-color: $input-bg; @include border-radius($modal-content-border-radius); @@ -143,7 +148,7 @@ $fa-font-path: "~font-awesome/fonts"; font-size: $font-size-base; button { - margin-left: 10px; + margin-right: 10px; @extend .btn; &.swal2-confirm { diff --git a/src/services/webPlatformUtils.service.ts b/src/services/webPlatformUtils.service.ts index a2fec184fb..e6b18b6166 100644 --- a/src/services/webPlatformUtils.service.ts +++ b/src/services/webPlatformUtils.service.ts @@ -178,7 +178,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService { } async showDialog(text: string, title?: string, confirmText?: string, cancelText?: string, type?: string) { - let iconClasses = null; + let iconClasses: string = null; if (type != null) { // If you add custom types to this part, the type to SweetAlertIcon cast below needs to be changed. switch (type) {