1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00:00

[CL-135] Migrate component library to standalone components (#12389)

* Migrate component library to standalone components

* Fix tests
This commit is contained in:
Oscar Hinton
2024-12-17 23:29:48 +01:00
committed by GitHub
parent ac13cf7ce6
commit 5a582dfc6f
101 changed files with 330 additions and 216 deletions

View File

@@ -1,12 +1,17 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { DialogRef, DIALOG_DATA } from "@angular/cdk/dialog";
import { NgIf } from "@angular/common";
import { Component, Inject } from "@angular/core";
import { FormGroup } from "@angular/forms";
import { FormGroup, ReactiveFormsModule } from "@angular/forms";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { SimpleDialogOptions, SimpleDialogType, Translation } from "../..";
import { BitSubmitDirective } from "../../../async-actions/bit-submit.directive";
import { BitFormButtonDirective } from "../../../async-actions/form-button.directive";
import { ButtonComponent } from "../../../button/button.component";
import { SimpleDialogComponent, IconDirective } from "../simple-dialog.component";
const DEFAULT_ICON: Record<SimpleDialogType, string> = {
primary: "bwi-business",
@@ -26,6 +31,16 @@ const DEFAULT_COLOR: Record<SimpleDialogType, string> = {
@Component({
templateUrl: "./simple-configurable-dialog.component.html",
standalone: true,
imports: [
ReactiveFormsModule,
BitSubmitDirective,
SimpleDialogComponent,
IconDirective,
ButtonComponent,
BitFormButtonDirective,
NgIf,
],
})
export class SimpleConfigurableDialogComponent {
get iconClasses() {