Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1625a77

Browse files
committed
convert class to func component, build by rollup
1 parente43eec8 commit1625a77

22 files changed

+3063
-27886
lines changed

‎.all-contributorsrc‎

Lines changed: 0 additions & 95 deletions
This file was deleted.

‎.babelrc.json‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎.eslintignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules/
33

44
# Config
55
webpack.config.js
6+
src/index.tsx

‎README.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ A fully customizable, one-time password input component for the web built with R
1515

1616
[![NPM](https://nodei.co/npm/reactjs-otp-input.png?compact=true)](https://nodei.co/npm/reactjs-otp-input/)
1717

18+
1819
####To install the latest stable version:
1920

2021
```
21-
npm install --save reactjs-otp-input
22+
npm install --save reactjs-otp-input@latest
2223
```
2324

2425
####Basic usage:
2526

2627
```jsx
2728
importReact, {Component }from'react';
28-
importOtpInputfrom'react-otp-input';
29+
import{OtpInput }from'react-otp-input';
2930

3031
exportdefaultconstApp {
3132
const [otp,setOtp]=useState('');
@@ -174,3 +175,5 @@ export default const App {
174175
```
175176
npm run dev
176177
```
178+
179+
###Support auto fill on mobile

‎dist/cjs/index.d.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
importReactfrom'react';
2+
interfaceIOtpInput{
3+
className?:string;
4+
containerStyle?:React.CSSProperties|string;
5+
disabledStyle?:React.CSSProperties|string;
6+
errorStyle?:React.CSSProperties|string;
7+
focusStyle?:React.CSSProperties|string;
8+
inputStyle?:React.CSSProperties|string;
9+
hasErrored?:boolean;
10+
isDisabled?:boolean;
11+
isInputNum?:boolean;
12+
isInputSecure?:boolean;
13+
numInputs:number;
14+
onChange:(otp:string)=>void;
15+
placeholder?:string;
16+
separator?:React.ReactNode|string;
17+
shouldAutoFocus?:boolean;
18+
value?:string;
19+
'data-testid'?:string;
20+
'data-cy'?:string;
21+
}
22+
declareconstOtpInput:(props:IOtpInput)=>import("react/jsx-runtime").JSX.Element;
23+
export{OtpInput};

‎dist/cjs/index.js‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/cjs/index.js.map‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/esm/index.d.ts‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
importReactfrom'react';
2+
interfaceIOtpInput{
3+
className?:string;
4+
containerStyle?:React.CSSProperties|string;
5+
disabledStyle?:React.CSSProperties|string;
6+
errorStyle?:React.CSSProperties|string;
7+
focusStyle?:React.CSSProperties|string;
8+
inputStyle?:React.CSSProperties|string;
9+
hasErrored?:boolean;
10+
isDisabled?:boolean;
11+
isInputNum?:boolean;
12+
isInputSecure?:boolean;
13+
numInputs:number;
14+
onChange:(otp:string)=>void;
15+
placeholder?:string;
16+
separator?:React.ReactNode|string;
17+
shouldAutoFocus?:boolean;
18+
value?:string;
19+
'data-testid'?:string;
20+
'data-cy'?:string;
21+
}
22+
declareconstOtpInput:(props:IOtpInput)=>import("react/jsx-runtime").JSX.Element;
23+
export{OtpInput};

‎dist/esm/index.js‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/esm/index.js.map‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp