Skip to content

Commit 9d0f3b7

Browse files
committed
tidy up class handling
1 parent eb7f2cd commit 9d0f3b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/tag/tag.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
export type TagType = "beta" | "community" | "custom" | "dedicated" | "experimental" | "ibm" | "local" | "private" | "third-party";
1111

1212
/**
13-
* Supported tags types for carbon v10
13+
* Supported tag types for carbon v10
1414
*/
1515
export type TagTypeExperimental = "basic" | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "cool-gray" | "warm-gray";
1616

@@ -29,7 +29,7 @@ export class Tag {
2929
*/
3030
@Input() type: TagType | TagTypeExperimental = "ibm";
3131

32-
@Input() class: String;
32+
@Input() class = "";
3333

3434
@HostBinding("attr.class") get attrClass() {
3535
return `bx--tag bx--tag--${this.type} ${this.class}`;

src/tag/tag.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ storiesOf("Tag", module)
2121
.add("Basic", () => ({
2222
template: `
2323
<app-experimental-component [(isExperimental)]="experimental"></app-experimental-component>
24-
<ibm-tag [type]="(!experimental ? 'ibm' : 'basic')">{{ !experimental ? "IBM" : "Basic" }}</ibm-tag>
24+
<ibm-tag [type]="(!experimental ? 'ibm' : 'basic')" class="foo {{test}}">{{ !experimental ? "IBM" : "Basic" }}</ibm-tag>
2525
<br><br>
2626
<ibm-tag [type]="(!experimental ? 'beta' : 'red')">{{ !experimental ? "Beta" : "Red" }}</ibm-tag>
2727
<br><br>

0 commit comments

Comments
 (0)