-
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
fix(number-input): remove default value for label #5347
Conversation
Deploy preview for carbon-elements ready! Built with commit 5047ceb |
Deploy preview for carbon-components-react ready! Built with commit 5047ceb https://deploy-preview-5347--carbon-components-react.netlify.com |
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.
Looks fine from the diff, what are the implications for removing it? Does any part of the rendered UI change for folks who might be using the default prop?
@abbeyhrt Would you be able to do some quick testing if setting empty label has the same visual effect as |
@joshblack @asudoh in the storybook, it seems to move a 7 pixels down if there is no label present vs
|
@abbeyhrt To do that, I think we need to ensure the styling of |
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.
LGTM 👍 ✅
Closes #5341
This removes the default prop for
label
so the label element isn't always rendered, for example if a user wants to label the Number Input withariaLabel
instead.Changelog
Removed
label
default propTesting / Reviewing
Check that if
label
is empty, no label element is rendered