Improve tag list to display all tags in the selection
Signed-off-by: trivernis <trivernis@protonmail.com>pull/4/head
parent
b81a83a328
commit
45fffba33a
@ -0,0 +1,4 @@
|
||||
<div class="tag-item-wrapper">
|
||||
<span *ngIf="tag.namespace" class="tag-item-namespace" [style]="{color: namespaceColor}">{{tag.namespace}}:</span>
|
||||
<span class="tag-item-name" [style]="{color: tagColor}">{{tag.name}}</span>
|
||||
</div>
|
@ -0,0 +1,10 @@
|
||||
.tag-item-wrapper {
|
||||
display: inline;
|
||||
width: 100%;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.tag-item-namespace {
|
||||
margin-right: 0.25em;
|
||||
opacity: 80%;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TagItemComponent } from './tag-item.component';
|
||||
|
||||
describe('TagItemComponent', () => {
|
||||
let component: TagItemComponent;
|
||||
let fixture: ComponentFixture<TagItemComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TagItemComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TagItemComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@ -0,0 +1,16 @@
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
import {Tag} from "../../models/Tag";
|
||||
|
||||
@Component({
|
||||
selector: 'app-tag-item',
|
||||
templateUrl: './tag-item.component.html',
|
||||
styleUrls: ['./tag-item.component.scss']
|
||||
})
|
||||
export class TagItemComponent {
|
||||
|
||||
@Input() tag!: Tag;
|
||||
@Input() namespaceColor: string | undefined;
|
||||
@Input() tagColor: string | undefined;
|
||||
|
||||
constructor() { }
|
||||
}
|
Loading…
Reference in New Issue