Skip to content

Commit c66e1f2

Browse files
committed
support extra classes and remove redundant span
1 parent 27a1ae6 commit c66e1f2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tag/tag.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@ export type TagTypeExperimental = "basic" | "red" | "magenta" | "purple" | "blue
1919
*/
2020
@Component({
2121
selector: "ibm-tag",
22-
template: `<span><ng-content></ng-content></span>`
22+
template: `<ng-content></ng-content>`
2323
})
2424
export class Tag {
2525
/**
2626
* type of the tag determines the styling
2727
*
2828
* Reference `TagType` for v9 applications, and `TagTypeExperimental` for v10/v9 experimental mode applications
2929
*/
30-
@Input()
31-
type: TagType | TagTypeExperimental = "ibm";
30+
@Input() type: TagType | TagTypeExperimental = "ibm";
31+
32+
@Input() class: String;
3233

3334
@HostBinding("attr.class") get attrClass() {
34-
return `bx--tag bx--tag--${this.type}`;
35+
return `bx--tag bx--tag--${this.type} ${this.class}`;
3536
}
3637
}

0 commit comments

Comments
 (0)