casino/frontend/src/app/feature/game/blackjack/components/game-controls/game-controls.component.ts
Jan-Marlon Leibl 03ce527087
All checks were successful
CI / Get Changed Files (pull_request) Successful in 6s
CI / Checkstyle Main (pull_request) Has been skipped
CI / prettier (pull_request) Successful in 37s
CI / eslint (pull_request) Successful in 39s
CI / test-build (pull_request) Successful in 46s
refactor(blackjack): rename event emitters for clarity
2025-03-26 13:35:07 +01:00

36 lines
1 KiB
TypeScript

import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';
import { CommonModule } from '@angular/common';
@Component({
selector: 'app-game-controls',
standalone: true,
imports: [CommonModule],
template: `
<div class="flex justify-center gap-4">
<button
(click)="hit.emit()"
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]"
>
Ziehen
</button>
<button
(click)="stand.emit()"
class="button-primary px-8 py-4 text-lg font-medium min-w-[120px]"
>
Halten
</button>
<button
(click)="leave.emit()"
class="bg-accent-red hover:bg-accent-red/80 px-8 py-4 rounded text-lg font-medium min-w-[120px] transition-all duration-300"
>
Abbrechen
</button>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class GameControlsComponent {
@Output() hit = new EventEmitter<void>();
@Output() stand = new EventEmitter<void>();
@Output() leave = new EventEmitter<void>();
}