From 7aae25e0edbb5d360b6b92c4613c324c0be6ea0a Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:32:40 +0200 Subject: [PATCH] PER-9922 Show loading spinner and success message checkout --- .../loading-spinner.component.scss | 6 ++++++ .../loading-spinner.component.ts | 10 +++++++-- .../new-pledge/new-pledge.component.html | 9 ++++++++ .../new-pledge/new-pledge.component.spec.ts | 21 +++++++++++++++++++ .../new-pledge/new-pledge.component.ts | 6 +++++- src/app/pledge/pledge.module.ts | 2 ++ 6 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/app/component-library/components/loading-spinner/loading-spinner.component.scss b/src/app/component-library/components/loading-spinner/loading-spinner.component.scss index ac85d90f2..18a9b4611 100644 --- a/src/app/component-library/components/loading-spinner/loading-spinner.component.scss +++ b/src/app/component-library/components/loading-spinner/loading-spinner.component.scss @@ -11,6 +11,12 @@ border: 1px solid rgba(54, 68, 147, 0.4); border-radius: 12px; } + +:host(.full-screen) { + left: 0; + z-index: 2; +} + .spinner-container { position: relative; display: flex; diff --git a/src/app/component-library/components/loading-spinner/loading-spinner.component.ts b/src/app/component-library/components/loading-spinner/loading-spinner.component.ts index a39d3c45a..f8aad7b14 100644 --- a/src/app/component-library/components/loading-spinner/loading-spinner.component.ts +++ b/src/app/component-library/components/loading-spinner/loading-spinner.component.ts @@ -1,9 +1,15 @@ /* @format */ -import { Component } from '@angular/core'; +import { Component, HostBinding, Input } from '@angular/core'; @Component({ selector: 'pr-loading-spinner', templateUrl: './loading-spinner.component.html', styleUrl: './loading-spinner.component.scss', }) -export class LoadingSpinnerComponent {} +export class LoadingSpinnerComponent { + @Input() isFullScreen = false; + + @HostBinding('class.full-screen') get fullScreenClass() { + return this.isFullScreen; + } +} diff --git a/src/app/pledge/components/new-pledge/new-pledge.component.html b/src/app/pledge/components/new-pledge/new-pledge.component.html index df7d4f13b..1aaddc078 100644 --- a/src/app/pledge/components/new-pledge/new-pledge.component.html +++ b/src/app/pledge/components/new-pledge/new-pledge.component.html @@ -1,5 +1,10 @@