From b7c3474380ade498171a57db924c45c705d80745 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..211dcd9286 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, FocusEventHandlers, 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, FocusEventHandlers { value?: string[]; defaultValue?: string[]; onUpdate?: (value: string[]) => void; diff --git a/src/components/types.ts b/src/components/types.ts index 822997285c..510eb16f7c 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 FocusEventHandlers { /** 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; }