From 03bd6ec4db02aa8beb62f60a4f0ed80fb544fc57 Mon Sep 17 00:00:00 2001 From: Prajwal Deep Bhandari Date: Fri, 3 Mar 2023 13:00:20 +0545 Subject: [PATCH 1/2] FIX: ISSUE #938 Providing multiple classes in positionClass --- src/lib/overlay/overlay.ts | 3 ++- tsconfig.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/overlay/overlay.ts b/src/lib/overlay/overlay.ts index 5312ccb1..e1bebff6 100644 --- a/src/lib/overlay/overlay.ts +++ b/src/lib/overlay/overlay.ts @@ -63,7 +63,8 @@ export class Overlay { const pane = this._document.createElement('div'); pane.id = 'toast-container'; - pane.classList.add(positionClass); + const positionClassArray = positionClass.replaceAll(/\s/g,"#").split("#") + positionClassArray.forEach((posClass:string)=>posClass.length && pane.classList.add(posClass)); pane.classList.add('toast-container'); if (!overlayContainer) { diff --git a/tsconfig.json b/tsconfig.json index 7b6edd0b..2e6b7270 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,8 @@ "module": "es2020", "lib": [ "es2018", - "dom" + "dom", + "es2021" ], "useDefineForClassFields": false }, From 92e576ea3d04978b83791abd8dad56a117f2b36a Mon Sep 17 00:00:00 2001 From: Prajwal Deep Bhandari Date: Fri, 3 Mar 2023 13:00:20 +0545 Subject: [PATCH 2/2] FIX: ISSUE #938 Providing multiple classes in positionClass --- src/lib/overlay/overlay.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/overlay/overlay.ts b/src/lib/overlay/overlay.ts index 5312ccb1..a46c42a2 100644 --- a/src/lib/overlay/overlay.ts +++ b/src/lib/overlay/overlay.ts @@ -63,7 +63,8 @@ export class Overlay { const pane = this._document.createElement('div'); pane.id = 'toast-container'; - pane.classList.add(positionClass); + const positionClassArray = positionClass.split(/\s/g) + positionClassArray.forEach((posClass:string)=>posClass.length && pane.classList.add(posClass)); pane.classList.add('toast-container'); if (!overlayContainer) {