-
Notifications
You must be signed in to change notification settings - Fork 141
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
Toggle component #3031
Toggle component #3031
Conversation
|
Size Change: 0 B Total Size: 769 kB ℹ️ View Unchanged
|
size-limit report 📦
|
disabled={disabled} | ||
checked={checked} | ||
onChange={onInputChange} | ||
aria-label={computedAriaLabel} |
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.
We don't need aria-label
here. The value from the label already comes from the wrapping label.
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.
I followed the Bento implementation, and they do support having it without a label - that is why we have this property and that the 'label' property is not mandatory.
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.
What is the use case of having a toggle without any label?
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.
To be honest I am not sure - The bento definition for Toggle says that 'toggle only' is one of the possible ways of using it, although I don't see any use-case (at least for us) right now.
I added that anyway since I wanted to make the component comply with the Bento one.
But if you think that we don't need this, then I can remove this feature
Quality Gate passedIssues Measures |
Summary
toggle
css variables from Bento to properly provide the correct colors/values to the Toggle SCSS file(This component will be used in the fastlane branch)
Tested scenarios