Skip to content

Commit

Permalink
fix: 🐛 fixex the issue of number input
Browse files Browse the repository at this point in the history
fixes the issue of number input

ref: #419
  • Loading branch information
priyanshu2k3 committed Nov 5, 2024
1 parent f58dd48 commit 2f97482
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions package/components/inputs/CorePhone.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ import React from "react";

import CoreInput from "./CoreInput";
import { sanitizeComponentProps } from "../../utils/componentUtil";

Check failure on line 5 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

There should be at least one empty line between import groups
import { number } from "yup";

Check failure on line 6 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

`yup` import should occur before import of `./CoreInput`

Check failure on line 6 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

'number' is defined but never used

Check failure on line 6 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

'number' is defined but never used

export default function CorePhone(props) {
props = sanitizeComponentProps(CorePhone, props);
return <CoreInput {...props} type="number" />;
props = sanitizeComponentProps(CorePhone, props);

Check failure on line 9 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Expected indentation of 2 spaces but found 0
return <CoreInput {...props} tyope = "text"

Check failure on line 10 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Expected indentation of 2 spaces but found 0

Check failure on line 10 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Property should be placed on a new line

Check failure on line 10 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Prop `tyope` must be placed on a new line
inputProps={{

Check failure on line 11 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Expected indentation of 4 spaces but found 0
inputMode: 'numeric',

Check failure on line 12 in package/components/inputs/CorePhone.js

View workflow job for this annotation

GitHub Actions / Validate code style

Expected indentation of 6 spaces but found 0
pattern: "[0-9]*",
min: 1,
// step: 1,
max: 999999999999,
}}
/>;
}
CorePhone.validProps = [...CoreInput.validProps];
CorePhone.invalidProps = [];
CorePhone.invalidProps = [];

0 comments on commit 2f97482

Please sign in to comment.