Skip to content

Commit d147f1f

Browse files
committed
🏷️ Replace deprecated event types
1 parent 6711c86 commit d147f1f

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import styles from './button.module.scss'
88
export type ReactButtonProps = {
99
onClick?: React.MouseEventHandler<HTMLButtonElement>
1010
children?: React.ReactNode
11-
} & ButtonProps<React.HTMLAttributes<HTMLElement>>
11+
} & ButtonProps<Record<string, unknown>>
1212

1313
const Button = ({
1414
theme,

src/components/Counter/Counter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const Counter = ({
108108
}
109109
}
110110

111-
const handleInput = (event: React.FormEvent) => {
111+
const handleInput = (event: React.InputEvent<HTMLInputElement>) => {
112112
const target = event.target
113113

114114
if (target instanceof HTMLInputElement) {

src/components/List/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const List = ({
4848
? { maxHeight } as React.CSSProperties
4949
: undefined
5050

51-
const search = (event: React.FormEvent<HTMLInputElement>) => {
51+
const search = (event: React.InputEvent<HTMLInputElement>) => {
5252
const value = (event.target as HTMLInputElement).value.toLowerCase()
5353

5454
setSearchValue(value)

src/components/OTPInput/OTPInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const OTPInput = ({
6767
}
6868
}
6969

70-
const handleInput = (event: React.FormEvent<HTMLInputElement>) => {
70+
const handleInput = (event: React.InputEvent<HTMLInputElement>) => {
7171
const target = event.target
7272

7373
if (!(target instanceof HTMLInputElement)) {

src/components/RangeSlider/RangeSlider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const RangeSlider = ({
5959
}
6060
}
6161

62-
const handleInput = (event: React.FormEvent) => {
62+
const handleInput = (event: React.InputEvent<HTMLInputElement>) => {
6363
const target = event.target
6464

6565
if (!(target instanceof HTMLInputElement)) {

0 commit comments

Comments
 (0)