Skip to content

Commit 0a13ef4

Browse files
committed
update props listed in README
1 parent d4a7f3f commit 0a13ef4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export default function App() {
4444
| ----------- | ---------- | ---------- | -------- | --------------------------------------------------------- |
4545
| autoFocus | `boolean` | false | false | Focus on render |
4646
| length | `number` | `4` | false | How many items will be rendered |
47-
| onChange | `function` | `() => {}` | true | Function called when the value changes |
47+
| onChange | `function` | `() => {}` | false | Function called when the value changes |
48+
| onCompleted | `function` | `() => {}` | false | Function called when the code is completed |
4849
| placeholder | `string` | `·` | false | String rendered in each item when no value has been typed |
4950
| value | `string` | `() => {}` | false | Control internal input value |
5051

src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const KEY_CODE = {
1212
type Props = {
1313
autoFocus?: boolean;
1414
length?: number;
15-
onChange?: (data: string) => any;
16-
onCompleted?: (data: string) => any;
15+
onChange?: (data: string) => void;
16+
onCompleted?: (data: string) => void;
1717
placeholder?: string;
1818
value?: string;
1919
};

0 commit comments

Comments
 (0)