-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Enhancement/input component hiding of error icon #318
Enhancement/input component hiding of error icon #318
Conversation
Make error icon optional when input component is in error state
Awesome! @FatumaA would you be able to do the same for the following? InputNumber |
@MildTomato I've updated the PR to include InputNumber and Select. The Listbox does not seem as straight forward |
@@ -214,11 +217,11 @@ function InputNumber({ | |||
/> | |||
</div> */} | |||
{icon && <InputIconContainer icon={icon} />} | |||
{error ? ( | |||
{error && ( |
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.
the logic is possibly wrong here, as error
could be defined and hideErrorIcon
could be true.
But then. the <div>
below this line will still get rendered.
Might need to have a variable above like, const showErrorIcon = error && !hideErrorIcon
and then use that variable instead of error
on line 220.
I think the same can be applied to all files you've changed.
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've made the requested changes in the last commit
Supabase UI is being deprecated.As part of that, we are closing Pull Requests in this repo for now. If you'd like to still make these changes, you could consider making these changes in https://github.com/supabase/supabase/tree/master/packages/ui We are moving the components to the main mono repo at https://github.com/supabase/supabase. The auth component has been moved to it's own repo and package. https://github.com/supabase-community/auth-ui. You can also read the docs for auth ui here. |
What kind of change does this PR introduce?
Enhancement: Input component hiding of error icon
Closes #311
What is the current behavior?
Input component always shows an error icon when in error sttae
Please link any relevant issues here.
Closes #311
What is the new behavior?
Error icon in input can be toggled
Feel free to include screenshots if it includes visual changes.
supabse.ui.-.error.icon.mov
Additional context
Add any other context or screenshots.