feat(blackjack): add animated number component and usage
Some checks failed
Some checks failed
This commit is contained in:
parent
3d7ee92cf2
commit
f2d447abeb
11 changed files with 122 additions and 63 deletions
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue