-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow type=number and password on Input component #1248
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1248 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 61 61
Lines 836 836
Branches 327 327
=========================================
Hits 836 836
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
src/components/input/Input.tsx
Outdated
@@ -5,7 +5,7 @@ import { downcastRef } from '../../util/typing'; | |||
import InputRoot from './InputRoot'; | |||
|
|||
type ComponentProps = { | |||
type?: 'email' | 'search' | 'text' | 'url'; | |||
type?: 'email' | 'search' | 'text' | 'url' | 'number'; |
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 suggest to sort these values to make the list easier to scan.
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.
Also, are there other values for type
that we should be enabling? See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types for a list.
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 suggest to sort these values to make the list easier to scan.
Sort how?
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.
Also, are there other values for type that we should be enabling? See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types for a list.
Perhaps it's worth having password
as well.
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 suggest to sort these values to make the list easier to scan.
Sort how?
I have rearranged them a bit, putting text first, as it's the most common and default value.
4740c10
to
c60ed01
Compare
No description provided.