red-ui/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts
2020-11-26 20:17:46 +02:00

25 lines
693 B
TypeScript

import { Component, Input } from '@angular/core';
import { TypeValue } from '@redaction/red-ui-http';
@Component({
selector: 'redaction-annotation-icon',
templateUrl: './annotation-icon.component.html',
styleUrls: ['./annotation-icon.component.scss']
})
export class AnnotationIconComponent {
@Input() color: string;
@Input() type: 'square' | 'rhombus' | 'circle';
@Input() label: string;
@Input() dictType: TypeValue;
constructor() {}
public get isHint() {
return this.type === 'circle' || this.dictType?.type === 'hint';
}
public get isRequest() {
return this.type === 'rhombus' || this.dictType?.type === 'redaction';
}
}