-
Notifications
You must be signed in to change notification settings - Fork 4
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
[DUOS-2635] Implemented disabled checkboxes for data submission form #2329
Conversation
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 good! 👍🏽
label({ | ||
className: `regular-checkbox ${!isValid(validation) ? 'errored' : ''}`, | ||
htmlFor: `${id}`, | ||
style: disabled ? { cursor: 'not-allowed' } : null | ||
}, [toggleText]) | ||
]); |
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'm seeing two things unrelated to the ticket that shouldn't hold up this PR, maybe we can address separately.
- I had the question of Why is the input not inside the label? and needed to look that up. I learned HTML in the 90's, but apparently it can be before, around, or after
- We're still using hyperscript here ... would be really nice to get rid of that and stick with jsx.
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.
- Yes! And I also don't understand why the input tag is not directly creating the checkbox.
- Definitely agree!
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 good! Might just be worth double checking the behavior if it's enabled (I'm assuming it's fine)
@@ -485,6 +485,7 @@ export const FormInputCheckbox = (config) => { | |||
label({ | |||
className: `regular-checkbox ${!isValid(validation) ? 'errored' : ''}`, | |||
htmlFor: `${id}`, | |||
style: disabled ? { cursor: 'not-allowed' } : null |
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'm assuming that this will default to pointer
in the null case?
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.
Yes, that's right!
Addresses
https://broadworkbench.atlassian.net/browse/DUOS-2635
Summary
Have you read Terra's Contributing Guide lately? If not, do that first.