1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-27 10:03:23 +00:00
Files
browser/libs/components/src/form-field/prefix.directive.ts
Vicki League b42ecccb39 initial migration run
(cherry picked from commit 4eb5023a30)
2025-07-01 16:05:52 -04:00

23 lines
644 B
TypeScript

import { Directive, HostBinding, Input, OnInit, Optional } from "@angular/core";
import { BitIconButtonComponent } from "../icon-button/icon-button.component";
@Directive({
selector: "[bitPrefix]",
})
export class BitPrefixDirective implements OnInit {
// TODO: Skipped for migration because:
// Accessor inputs cannot be migrated as they are too complex.
@HostBinding("class") @Input() get classList() {
return ["tw-text-muted"];
}
constructor(@Optional() private iconButtonComponent: BitIconButtonComponent) {}
ngOnInit() {
if (this.iconButtonComponent) {
this.iconButtonComponent.size = "small";
}
}
}