feat(blackjack): add animated number component and usage
Some checks failed
CI / Get Changed Files (pull_request) Successful in 27s
CI / Checkstyle Main (pull_request) Has been skipped
CI / eslint (pull_request) Failing after 41s
CI / test-build (pull_request) Successful in 49s
CI / prettier (pull_request) Failing after 58s

This commit is contained in:
Jan-Marlon Leibl 2025-04-03 10:02:15 +02:00
parent 3d7ee92cf2
commit f2d447abeb
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
11 changed files with 122 additions and 63 deletions

View file

@ -11,11 +11,12 @@ import {
import { CommonModule, CurrencyPipe } from '@angular/common';
import { FormGroup, ReactiveFormsModule } from '@angular/forms';
import { BettingService } from '@blackjack/services/betting.service';
import { AnimatedNumberComponent } from '../animated-number/animated-number.component';
@Component({
selector: 'app-game-info',
standalone: true,
imports: [CommonModule, CurrencyPipe, ReactiveFormsModule],
imports: [CommonModule, CurrencyPipe, ReactiveFormsModule, AnimatedNumberComponent],
template: `
<div class="card p-4">
<h3 class="section-heading text-xl mb-4">Spiel Informationen</h3>
@ -23,7 +24,7 @@ import { BettingService } from '@blackjack/services/betting.service';
<div class="flex justify-between items-center">
<span class="text-text-secondary">Aktuelle Wette:</span>
<span [class]="currentBet > 0 ? 'text-accent-red' : 'text-text-secondary'">
{{ currentBet | currency: 'EUR' }}
<app-animated-number [value]="currentBet" [duration]="0.5"></app-animated-number>
</span>
</div>