mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-09 05:57:40 +02:00
08a6f91411
--------- Co-authored-by: William Martin <contact@willmartian.com>
22 lines
463 B
TypeScript
22 lines
463 B
TypeScript
import { Component, Input, booleanAttribute } from "@angular/core";
|
|
|
|
import { Option } 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;
|
|
|
|
@Input({ required: true })
|
|
value: T;
|
|
|
|
@Input({ required: true })
|
|
label: string;
|
|
|
|
@Input({ transform: booleanAttribute })
|
|
disabled: boolean;
|
|
}
|