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; }