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 doesn't look like a tag when there is only one character #5009

Closed
2 tasks
ashpc opened this issue Jan 10, 2020 · 6 comments · Fixed by #5053
Closed
2 tasks

Tag component doesn't look like a tag when there is only one character #5009

ashpc opened this issue Jan 10, 2020 · 6 comments · Fixed by #5053
Assignees
Labels

Comments

@ashpc
Copy link

ashpc commented Jan 10, 2020

What package(s) are you using?

  • carbon-components 10.9.0
  • carbon-components-react 7.9.0

Detailed description

Describe in detail the issue you're having.
We are using Tag component to show the count of roles a user can have and when it's in single-digit the component looks like a ball instead of tag. There should a min width provided to make it look like a tag.

Is this issue related to a specific component?
Tag

What did you expect to happen? What happened instead? What would you like to see changed?
We are using Tag component to show the count of roles a user can have and when it's in single-digit the component looks like a ball instead of tag.

What browser are you working in?
FF
Chrome
Safari

What version of the Carbon Design System are you using?

  • carbon-components 10.9.0
  • carbon-components-react 7.9.0

What offering/product do you work on? Any pressing ship or release dates we should be aware of?
IBM Cloud

Steps to reproduce the issue

  1. Use a single character in a tag component and see the issue

Screen Shot 2020-01-10 at 11 12 59 AM
Screen Shot 2020-01-10 at 11 13 03 AM

@tw15egan
Copy link
Collaborator

@carbon-design-system/design we could add a min-width property to ensure single character tags still maintain a pill shape

@aagonzales
Copy link
Member

I did talk to the design team and we do like the pill shape better for a single digital but I think technically if we set a min-width on tag, say 32px, then the text will be off centered, which is not ideal.
image

@tw15egan
Copy link
Collaborator

@aagonzales It seems like we can center the single-digit without it affecting the other variations

https://codesandbox.io/s/codesandbox-x5etc

Screen Shot 2020-01-14 at 2 51 58 PM

@aagonzales
Copy link
Member

Oh noice! You're a genius TJ.

@tw15egan
Copy link
Collaborator

If this is okay, I'll go ahead and make a PR 👍

@tw15egan tw15egan self-assigned this Jan 15, 2020
@aagonzales
Copy link
Member

Yup, approved ✅

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

Successfully merging a pull request may close this issue.

5 participants