mirror of
https://github.com/bitwarden/browser
synced 2026-01-03 00:53:23 +00:00
[CL-707] Migrate CL codebase to signals (#15340)
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { Component, Input, booleanAttribute } from "@angular/core";
|
||||
import { Component, booleanAttribute, input } from "@angular/core";
|
||||
|
||||
import { Option } from "./option";
|
||||
import { MappedOptionComponent } from "./option";
|
||||
|
||||
@Component({
|
||||
selector: "bit-option",
|
||||
template: `<ng-template><ng-content></ng-content></ng-template>`,
|
||||
})
|
||||
export class OptionComponent<T = unknown> implements Option<T> {
|
||||
@Input()
|
||||
icon?: string;
|
||||
export class OptionComponent<T = unknown> implements MappedOptionComponent<T> {
|
||||
readonly icon = input<string>();
|
||||
|
||||
@Input({ required: true })
|
||||
value: T;
|
||||
readonly value = input.required<T>();
|
||||
|
||||
@Input({ required: true })
|
||||
label: string;
|
||||
readonly label = input.required<string>();
|
||||
|
||||
@Input({ transform: booleanAttribute })
|
||||
disabled: boolean;
|
||||
readonly disabled = input(undefined, { transform: booleanAttribute });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user