1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[SM-154] Add labelledby to dialogs (#3439)

This commit is contained in:
Oscar Hinton
2022-09-08 10:37:23 +02:00
committed by GitHub
parent 05ebca2c4c
commit cb31a71e8d
13 changed files with 239 additions and 67 deletions

View File

@@ -0,0 +1,15 @@
import { DialogRef } from "@angular/cdk/dialog";
import { Directive, HostListener, Input, Optional } from "@angular/core";
@Directive({
selector: "[bitDialogClose]",
})
export class DialogCloseDirective {
@Input("bit-dialog-close") dialogResult: any;
constructor(@Optional() public dialogRef: DialogRef<any>) {}
@HostListener("click") close(): void {
this.dialogRef.close(this.dialogResult);
}
}