-
Notifications
You must be signed in to change notification settings - Fork 556
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
Wrap CheckBoxInput in InputWrapper to provide visual feedback #2423
Conversation
@@ -491,6 +491,12 @@ loadingSize = 30px | |||
span | |||
display block | |||
margin-left 20px | |||
.auth0-lock-input-wrap | |||
background #ffffff |
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.
There are needed otherwise we inherit the grey background/border from the InputWrap which is not desired
let blockClassName = `auth0-lock-input-block auth0-lock-input-${name}`; | ||
if (!isValid) { | ||
blockClassName += ' auth0-lock-error'; | ||
} | ||
|
||
if (className) { |
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.
Needed a way to maintain the CSS for the CheckBoxInput so added this className
proper to allow that
2422fd3
to
a849c01
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2423 +/- ##
==========================================
+ Coverage 41.55% 41.71% +0.15%
==========================================
Files 120 120
Lines 3025 3028 +3
Branches 325 327 +2
==========================================
+ Hits 1257 1263 +6
+ Misses 1674 1673 -1
+ Partials 94 92 -2
☔ View full report in Codecov by Sentry. |
**Added** - Wrap CheckBoxInput in InputWrapper to provide visual feedback [\#2423](#2423) ([ewanharris](https://github.com/ewanharris))
Changes
Wrap the
CheckBoxInput
inInputWrapper
to allow for providing feedback as to what is wrong when a user clicks submit without the checkbox being selected. Below is an example of what this looks like, rather than highlight using a border like other fields we change the text to red.This image is outdated see below
I did also see what it looked like without the red text, which is a little less obvious.
This is if we add a border around the entire element like the other components
I did also try a border/outline around the checkbox element but it looked bad due to inability to set the border radiu
Happy to change this up if there's a general preference that looks better.
Current status:
Invalid hint text provided
No invalid hint text provided
References
#2400
Testing
Checklist