1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 22:44:11 +00:00

[CL-946] Migrate ToggleGroup to OnPush (#17718)

Migrates the ToggleGroup and Toggle components to use OnPush.
This commit is contained in:
Oscar Hinton
2025-12-05 13:06:03 +01:00
committed by GitHub
parent 110c955cff
commit ff7b625851
5 changed files with 178 additions and 122 deletions

View File

@@ -1,16 +1,16 @@
<input
type="radio"
id="bit-toggle-{{ id }}"
[id]="id"
[name]="name"
[ngClass]="inputClasses"
[checked]="selected"
(change)="onInputInteraction()"
[class]="inputClasses"
[checked]="selected()"
(change)="handleInputChange()"
/>
<label for="bit-toggle-{{ id }}" [ngClass]="labelClasses" [title]="labelTitle()">
<label [for]="id" [class]="labelClasses" [title]="labelTitle()">
<span class="tw-line-clamp-2 tw-break-words" #labelContent>
<ng-content></ng-content>
</span>
<span class="tw-shrink-0" #bitBadgeContainer [hidden]="!bitBadgeContainerHasChidlren()">
<span class="tw-shrink-0" [hidden]="!hasBadge()">
<ng-content select="[bitBadge]"></ng-content>
</span>
</label>