Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag component: misalignment when a mix of tags with and without icons are used #7920

Closed
1 of 2 tasks
holmansze opened this issue Feb 27, 2021 · 0 comments · Fixed by #7927
Closed
1 of 2 tasks

Tag component: misalignment when a mix of tags with and without icons are used #7920

holmansze opened this issue Feb 27, 2021 · 0 comments · Fixed by #7927

Comments

@holmansze
Copy link
Contributor

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

I got an issue on the newly added prop renderIcon in the Tag React component. I am rendering a wrappable list of tags, that has a mix of tags with and without renderIcon. It renders okay, except there is a misalignment issue. The tags without renderIcon got pushed down a little bit.

Steps to reproduce the issue

Here's an example:

    <Tag key="tag1" type="gray">
      tag1
    </Tag>
    <Tag key="tag2" type="gray" renderIcon={Warning16}>
      tag2
    </Tag>
    <Tag key="tag3" type="gray">
      tag3
    </Tag>

image

CodeSandbox:
https://codesandbox.io/s/bold-brook-2cq7e?file=/src/index.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants