1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[CL-553] Migrate CL to Control Flow syntax (#12390)

This commit is contained in:
Oscar Hinton
2025-02-03 20:11:59 +01:00
committed by GitHub
parent 444e928895
commit e5ffc162b8
47 changed files with 480 additions and 428 deletions

View File

@@ -1,16 +1,18 @@
<ng-container *ngIf="label">
@if (label) {
<fieldset>
<legend class="tw-mb-1 tw-block tw-text-sm tw-font-semibold tw-text-main">
<ng-content select="bit-label"></ng-content>
<span *ngIf="required" class="tw-text-xs tw-font-normal"> ({{ "required" | i18n }})</span>
@if (required) {
<span class="tw-text-xs tw-font-normal"> ({{ "required" | i18n }})</span>
}
</legend>
<ng-container *ngTemplateOutlet="content"></ng-container>
</fieldset>
</ng-container>
}
<ng-container *ngIf="!label">
@if (!label) {
<ng-container *ngTemplateOutlet="content"></ng-container>
</ng-container>
}
<ng-template #content>
<div>

View File

@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { NgIf, NgTemplateOutlet } from "@angular/common";
import { NgTemplateOutlet } from "@angular/common";
import { Component, ContentChild, HostBinding, Input, Optional, Self } from "@angular/core";
import { ControlValueAccessor, NgControl, Validators } from "@angular/forms";
@@ -14,7 +14,7 @@ let nextId = 0;
selector: "bit-radio-group",
templateUrl: "radio-group.component.html",
standalone: true,
imports: [NgIf, NgTemplateOutlet, I18nPipe],
imports: [NgTemplateOutlet, I18nPipe],
})
export class RadioGroupComponent implements ControlValueAccessor {
selected: unknown;