Skip to content

Commit c376cff

Browse files
fix(tag): set vertical alignment (#7927)
* fix(tag): set vertical alignment * docs(Tag): add test story Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 69d79ef commit c376cff

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/components/src/components/tag/_tag.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
min-height: rem(24px);
3737
margin: $carbon--spacing-02;
3838
padding: $carbon--spacing-02 $carbon--spacing-03;
39+
vertical-align: middle;
3940
word-break: break-word;
4041
border-radius: rem(15px);
4142
cursor: default;

packages/react/src/components/Tag/Tag-story.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ _Default.parameters = {
9494
},
9595
};
9696

97+
export const VerticalAlignment = () => (
98+
<>
99+
<Tag type="gray">Tag 1</Tag>
100+
<Tag type="gray" renderIcon={Compass16}>
101+
Tag 2
102+
</Tag>
103+
<Tag type="gray" filter>
104+
Tag 3
105+
</Tag>
106+
<Tag type="gray">Tag 3</Tag>
107+
</>
108+
);
109+
97110
export const Filter = () => (
98111
<Tag className="some-class" {...props.filter()} filter>
99112
{text('Content (children)', 'This is a tag')}

0 commit comments

Comments
 (0)