Skip to content
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

Merged
merged 1 commit into from
Sep 22, 2023
Merged

Conversation

acelaya
Copy link
Contributor

@acelaya acelaya commented Sep 22, 2023

No description provided.

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #1248 (c60ed01) into main (51d5d0b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1248   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           61        61           
  Lines          836       836           
  Branches       327       327           
=========================================
  Hits           836       836           
Files Changed Coverage Δ
src/components/input/Input.tsx 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -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';
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@acelaya acelaya changed the title Allow type=number on Input component Allow type=number and password on Input component Sep 22, 2023
@acelaya acelaya merged commit 3798dce into main Sep 22, 2023
4 checks passed
@acelaya acelaya deleted the number-input branch September 22, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants