-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore(slider): add no wrap white space to range label #6644
Conversation
Deploy preview for carbon-elements ready! Built with commit 6e21a60 |
Deploy preview for carbon-components-react ready! Built with commit 6e21a60 https://deploy-preview-6644--carbon-components-react.netlify.app |
@aledavila is there an issue or repro of the problem that this is solving? 👀 |
@joshblack So I had a question on slack about using labels but they had the issue with the spacing. And asked Anna about it. So the issue is that if you input a word it won't have the space since its meant for increments. So you'd have to manually add a space in your prop but if you do so it wraps. So I just made it so it wouldn't wrap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aledavila looks good!
Adds a no wrap to the range labels in the rare event that a user needs to have a word instead of a unit increment. However, because it's meant for unit increments a user would need to manually add their own space before the label in the prop. This helps in that use case so the word doesn't wrap and stays on the same line.
Testing / Reviewing
Check that slider and labels look fine.