This repository has been archived on 2026-05-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Codiki/frontend/src/app/components/confirmation-dialog/confirmation-dialog.component.ts
T
florianandTamotsu 1ca2f872f7
Build and Deploy Java Gradle Application / build-and-deploy (push) Successful in 1m39s
Update dependencies - spring boot 4 and angular 21 (#10)
Co-authored-by: Florian THIERRY
Reviewed-on: florian/codiki-hexagonal#10
2025-12-30 17:45:03 +01:00

35 lines
935 B
TypeScript

import { Component, inject, Input } from "@angular/core";
import { MatRippleModule } from "@angular/material/core";
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
export interface ConfirmationDialogData {
title: string;
description: string;
}
@Component({
selector: 'app-confirmation-dialog',
templateUrl: './confirmation-dialog.component.html',
styleUrl: './confirmation-dialog.component.scss',
imports: [MatRippleModule]
})
export class ConfirmationDialog {
private readonly dialogRef = inject(MatDialogRef<ConfirmationDialog>);
data: ConfirmationDialogData = inject(MAT_DIALOG_DATA);
get title(): string {
return this.data.title;
}
get description(): string {
return this.data.description;
}
closeAndValidate(): void {
this.dialogRef.close(true);
}
closeDialog(): void {
this.dialogRef.close(false);
}
}