Skip to content

Commit

Permalink
fix(TagGroup): ensure Tags with and without icons are aligned vertica…
Browse files Browse the repository at this point in the history
…lly (#7608)

* ensure tags with and without icons are aligned vertically

* edit existing story
  • Loading branch information
reidbarber authored Jan 14, 2025
1 parent 1d9e615 commit a9d4fef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ governing permissions and limitations under the License.

display: inline-grid;
align-items: center;
vertical-align: middle;
box-sizing: border-box;
position: relative;
cursor: default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const WithIcon: TagGroupStory = {
<TagGroup {...args} aria-label="Tag group">
{(item: any) => (
<Item key={item.key} textValue={item.label}>
<Audio />
{item.id !== 1 && <Audio />}
<Text>{item.label}</Text>
</Item>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/tag/stories/TagGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const WithAvatar: TagGroupStory = {
<TagGroup aria-label="Tag group with avatars" {...args}>
{(item: any) => (
<Item key={item.key} textValue={item.label}>
<Avatar src="https://i.imgur.com/kJOwAdv.png" alt="default Adobe avatar" />
{item.key === '1' && <Avatar src="https://i.imgur.com/kJOwAdv.png" alt="default Adobe avatar" />}
<Text>{item.label}</Text>
</Item>
)}
Expand Down

1 comment on commit a9d4fef

@rspbot
Copy link

@rspbot rspbot commented on a9d4fef Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.