diff --git a/webapp/src/app/shared/ui/loading/loading.component.html b/webapp/src/app/shared/ui/loading/loading.component.html new file mode 100644 index 00000000..e65e0384 --- /dev/null +++ b/webapp/src/app/shared/ui/loading/loading.component.html @@ -0,0 +1,9 @@ +
+
+ + + {{icon}} + +
+ {{text}} +
\ No newline at end of file diff --git a/webapp/src/app/shared/ui/loading/loading.component.scss b/webapp/src/app/shared/ui/loading/loading.component.scss new file mode 100644 index 00000000..a88249cc --- /dev/null +++ b/webapp/src/app/shared/ui/loading/loading.component.scss @@ -0,0 +1,41 @@ + +.loading-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 16px; + padding: 48px 0; +} + +.spinner-container { + --spinner-size: 60px; + + position: relative; + width: var(--spinner-size); + height: var(--spinner-size); +} + +.spinner-icon { + position: absolute; + inset: 0; + margin: auto; + + font-size: calc(var(--spinner-size) * 0.4); + width: calc(var(--spinner-size) * 0.4); + height: calc(var(--spinner-size) * 0.4); + + animation: pulse 1.2s ease-in-out infinite; +} + +@keyframes pulse { + 0%, + 100% { + transform: scale(1); + opacity: 1; + } + + 50% { + transform: scale(1.2); + opacity: 0.7; + } +} diff --git a/webapp/src/app/shared/ui/loading/loading.component.ts b/webapp/src/app/shared/ui/loading/loading.component.ts new file mode 100644 index 00000000..5f75a46a --- /dev/null +++ b/webapp/src/app/shared/ui/loading/loading.component.ts @@ -0,0 +1,15 @@ +import { Component,Input } from '@angular/core'; +import { MatProgressSpinner } from '@angular/material/progress-spinner'; +import { MatIcon } from '@angular/material/icon'; +@Component({ + selector: 'app-loading', + imports: [MatProgressSpinner,MatIcon], + templateUrl: './loading.component.html', + styleUrl: './loading.component.scss', +}) +export class LoadingComponent { +@Input() text = "Laden..." +@Input() icon = "graph_3"; +@Input() size = "150"; +@Input() diameter = "150"; +}