From fea343e5c0b08100f9c425a795ff849d52b77eab Mon Sep 17 00:00:00 2001 From: Valerii Sidorenko Date: Mon, 8 Jul 2024 11:47:40 +0200 Subject: [PATCH] fix: focus events handlers --- src/components/PinInput/PinInput.tsx | 4 ++-- src/components/types.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/PinInput/PinInput.tsx b/src/components/PinInput/PinInput.tsx index e0c2998c5b..6a03acb784 100644 --- a/src/components/PinInput/PinInput.tsx +++ b/src/components/PinInput/PinInput.tsx @@ -9,7 +9,7 @@ import type {TextInputProps, TextInputSize} from '../controls'; import {TextInput} from '../controls'; import {OuterAdditionalContent} from '../controls/common/OuterAdditionalContent/OuterAdditionalContent'; import {useDirection} from '../theme'; -import type {AriaLabelingProps, DOMProps, FocusEvents, QAProps} from '../types'; +import type {AriaLabelingProps, DOMProps, FocusEventsHandlers, QAProps} from '../types'; import {block} from '../utils/cn'; import {filterDOMProps} from '../utils/filterDOMProps'; @@ -24,7 +24,7 @@ export interface PinInputApi { focus: () => void; } -export interface PinInputProps extends DOMProps, AriaLabelingProps, QAProps, FocusEvents { +export interface PinInputProps extends DOMProps, AriaLabelingProps, QAProps, FocusEventsHandlers { value?: string[]; defaultValue?: string[]; onUpdate?: (value: string[]) => void; diff --git a/src/components/types.ts b/src/components/types.ts index 822997285c..788f716ba7 100644 --- a/src/components/types.ts +++ b/src/components/types.ts @@ -91,9 +91,9 @@ export interface AriaLabelingProps { 'aria-details'?: string; } -export interface FocusEvents { +export interface FocusEventsHandlers { /** Handler that is called when the element receives focus. */ - onFocus?(e: React.FocusEvent): void; + onFocus?: React.FocusEventHandler; /** Handler that is called when the element loses focus. */ - onBlur?(e: React.FocusEvent): void; + onBlur?: React.FocusEventHandler; }