Cleaning up comments
This commit is contained in:
@@ -5,24 +5,6 @@ import {
|
||||
HostListener
|
||||
} from '@angular/core';
|
||||
|
||||
/**
|
||||
* Reusable confirmation dialog modal.
|
||||
*
|
||||
* Usage:
|
||||
* ```html
|
||||
* @if (showConfirm()) {
|
||||
* <app-confirm-dialog
|
||||
* title="Delete Room?"
|
||||
* confirmLabel="Delete"
|
||||
* variant="danger"
|
||||
* (confirmed)="onDelete()"
|
||||
* (cancelled)="showConfirm.set(false)"
|
||||
* >
|
||||
* <p>This will permanently delete the room.</p>
|
||||
* </app-confirm-dialog>
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@Component({
|
||||
selector: 'app-confirm-dialog',
|
||||
standalone: true,
|
||||
@@ -32,19 +14,12 @@ import {
|
||||
}
|
||||
})
|
||||
export class ConfirmDialogComponent {
|
||||
/** Dialog title. */
|
||||
title = input.required<string>();
|
||||
/** Label for the confirm button. */
|
||||
confirmLabel = input<string>('Confirm');
|
||||
/** Label for the cancel button. */
|
||||
cancelLabel = input<string>('Cancel');
|
||||
/** Visual style of the confirm button. */
|
||||
variant = input<'primary' | 'danger'>('primary');
|
||||
/** Tailwind width class for the dialog. */
|
||||
widthClass = input<string>('w-[320px]');
|
||||
/** Emitted when the user confirms. */
|
||||
confirmed = output<undefined>();
|
||||
/** Emitted when the user cancels (backdrop click, Cancel button, or Escape). */
|
||||
cancelled = output<undefined>();
|
||||
|
||||
@HostListener('document:keydown.escape')
|
||||
|
||||
Reference in New Issue
Block a user