Skip to content

Commit

Permalink
Change input type to number (#1816)
Browse files Browse the repository at this point in the history
change input type to number
  • Loading branch information
apoorv1316 authored May 2, 2024
1 parent 816c9cc commit 9b482f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const ManualEntry = ({
<input
className=" focus:outline-none w-full rounded bg-white p-1 px-2 text-right text-sm font-medium text-miru-dark-purple-1000 focus:border-miru-gray-1000 focus:ring-1 focus:ring-miru-gray-1000"
placeholder="Rate"
type="text"
type="number"
value={rate}
onChange={handleSetRate}
onKeyDown={handleEnter}
Expand Down
10 changes: 10 additions & 0 deletions app/javascript/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,13 @@ input:-webkit-autofill:focus,
input:-webkit-autofill:active{
-webkit-box-shadow: 0 0 0 30px white inset !important;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type="number"] {
-moz-appearance: textfield;
}

0 comments on commit 9b482f0

Please sign in to comment.