1 import {Component, Input} from '@angular/core';
3 /* Simple component to render a boolean value as human-friendly text */
9 <span *ngIf="value" class="badge badge-success" i18n>Yes</span>
10 <span *ngIf="value == false" class="badge badge-secondary" i18n>No</span>
11 <ng-container *ngIf="value === null">
12 <span *ngIf="ternary" class="badge badge-light" i18n>Unset</span>
13 <span *ngIf="!ternary"> </span>
16 export class BoolDisplayComponent {
19 @Input() set value(v: boolean) {
22 get value(): boolean {
26 // If true, a null value displays as unset.
27 // If false, a null value displays as an empty string.
29 @Input() set ternary(t: boolean) {
32 get ternary(): boolean {