Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 6ced939

Browse files
authored
feat: add new html props (#144)
• the following is now supported on Input onFocus onBlur onKeyDown
1 parent dce3033 commit 6ced939

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/components/Input/Input.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ export interface Props {
2222
layout?: 'horizontal' | 'vertical'
2323
name?: string
2424
onChange?: any
25+
onFocus?: any
26+
onBlur?: any
27+
onKeyDown?: any
2528
placeholder?: string
2629
style?: React.CSSProperties
2730
type?:
@@ -62,6 +65,9 @@ function Input({
6265
layout,
6366
name,
6467
onChange,
68+
onBlur,
69+
onFocus,
70+
onKeyDown,
6571
placeholder,
6672
type,
6773
value,
@@ -125,6 +131,9 @@ function Input({
125131
id={id}
126132
name={name}
127133
onChange={onChange ? (event) => onChange(event) : undefined}
134+
onFocus={onFocus ? (event) => onFocus(event) : undefined}
135+
onBlur={onBlur ? (event) => onBlur(event) : undefined}
136+
onKeyDown={onKeyDown ? (event) => onKeyDown(event) : undefined}
128137
placeholder={placeholder}
129138
ref={inputRef}
130139
type={type}

0 commit comments

Comments
 (0)