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

Apply Prettier (#581)

This commit is contained in:
Oscar Hinton
2021-12-16 13:36:21 +01:00
committed by GitHub
parent 8b2dfc6cdc
commit 193434461d
589 changed files with 46650 additions and 41924 deletions

View File

@@ -1,28 +1,23 @@
import {
Directive,
ElementRef,
Input,
Renderer2,
} from '@angular/core';
import { Directive, ElementRef, Input, Renderer2 } from "@angular/core";
@Directive({
selector: '[appA11yTitle]',
selector: "[appA11yTitle]",
})
export class A11yTitleDirective {
@Input() set appA11yTitle(title: string) {
this.title = title;
@Input() set appA11yTitle(title: string) {
this.title = title;
}
private title: string;
constructor(private el: ElementRef, private renderer: Renderer2) {}
ngOnInit() {
if (!this.el.nativeElement.hasAttribute("title")) {
this.renderer.setAttribute(this.el.nativeElement, "title", this.title);
}
private title: string;
constructor(private el: ElementRef, private renderer: Renderer2) { }
ngOnInit() {
if (!this.el.nativeElement.hasAttribute('title')) {
this.renderer.setAttribute(this.el.nativeElement, 'title', this.title);
}
if (!this.el.nativeElement.hasAttribute('aria-label')) {
this.renderer.setAttribute(this.el.nativeElement, 'aria-label', this.title);
}
if (!this.el.nativeElement.hasAttribute("aria-label")) {
this.renderer.setAttribute(this.el.nativeElement, "aria-label", this.title);
}
}
}