Skip to content

Commit a9d4fef

Browse files
authored
fix(TagGroup): ensure Tags with and without icons are aligned vertically (#7608)
* ensure tags with and without icons are aligned vertically * edit existing story
1 parent 1d9e615 commit a9d4fef

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/@adobe/spectrum-css-temp/components/tags/index.css

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ governing permissions and limitations under the License.
4646

4747
display: inline-grid;
4848
align-items: center;
49+
vertical-align: middle;
4950
box-sizing: border-box;
5051
position: relative;
5152
cursor: default;

packages/@react-spectrum/tag/chromatic/TagGroup.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const WithIcon: TagGroupStory = {
7272
<TagGroup {...args} aria-label="Tag group">
7373
{(item: any) => (
7474
<Item key={item.key} textValue={item.label}>
75-
<Audio />
75+
{item.id !== 1 && <Audio />}
7676
<Text>{item.label}</Text>
7777
</Item>
7878
)}

packages/@react-spectrum/tag/stories/TagGroup.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const WithAvatar: TagGroupStory = {
175175
<TagGroup aria-label="Tag group with avatars" {...args}>
176176
{(item: any) => (
177177
<Item key={item.key} textValue={item.label}>
178-
<Avatar src="https://i.imgur.com/kJOwAdv.png" alt="default Adobe avatar" />
178+
{item.key === '1' && <Avatar src="https://i.imgur.com/kJOwAdv.png" alt="default Adobe avatar" />}
179179
<Text>{item.label}</Text>
180180
</Item>
181181
)}

0 commit comments

Comments
 (0)