1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[CL-221] Add chip-select component (#9021)

---------

Co-authored-by: William Martin <contact@willmartian.com>
This commit is contained in:
Victoria League
2024-05-23 16:30:55 -04:00
committed by GitHub
parent bbf1473022
commit 08a6f91411
16 changed files with 732 additions and 26 deletions

View File

@@ -1,5 +1,4 @@
import { coerceBooleanProperty } from "@angular/cdk/coercion";
import { Component, Input } from "@angular/core";
import { Component, Input, booleanAttribute } from "@angular/core";
import { Option } from "./option";
@@ -11,18 +10,12 @@ export class OptionComponent<T = unknown> implements Option<T> {
@Input()
icon?: string;
@Input()
value?: T = undefined;
@Input({ required: true })
value: T;
@Input()
label?: string;
@Input({ required: true })
label: string;
private _disabled = false;
@Input()
get disabled() {
return this._disabled;
}
set disabled(value: boolean | "") {
this._disabled = coerceBooleanProperty(value);
}
@Input({ transform: booleanAttribute })
disabled: boolean;
}