1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 16:43:27 +00:00
Files
browser/libs/components/src/dialog/simple-dialog/simple-dialog.component.ts
Oscar Hinton 26fb7effd3 Remove standalone true from platform and UIF (#15032)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 20:03:04 +02:00

30 lines
863 B
TypeScript

import { booleanAttribute, Component, ContentChild, Directive, input } from "@angular/core";
import { TypographyDirective } from "../../typography/typography.directive";
import { fadeIn } from "../animations";
import { DialogTitleContainerDirective } from "../directives/dialog-title-container.directive";
@Directive({
selector: "[bitDialogIcon]",
})
export class IconDirective {}
@Component({
selector: "bit-simple-dialog",
templateUrl: "./simple-dialog.component.html",
animations: [fadeIn],
imports: [DialogTitleContainerDirective, TypographyDirective],
})
export class SimpleDialogComponent {
@ContentChild(IconDirective) icon!: IconDirective;
/**
* Optional flag to hide the dialog's center icon. Defaults to false.
*/
hideIcon = input(false, { transform: booleanAttribute });
get hasIcon() {
return this.icon != null;
}
}