Skip to content

Commit

Permalink
fix: focus events handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed Jul 8, 2024
1 parent 5fdcc22 commit b7c3474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/PinInput/PinInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/components/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export interface AriaLabelingProps {
'aria-details'?: string;
}

export interface FocusEvents<Target = Element> {
export interface FocusEventHandlers<Target = Element> {
/** Handler that is called when the element receives focus. */
onFocus?(e: React.FocusEvent<Target>): void;
onFocus?: React.FocusEventHandler<Target>;
/** Handler that is called when the element loses focus. */
onBlur?(e: React.FocusEvent<Target>): void;
onBlur?: React.FocusEventHandler<Target>;
}

0 comments on commit b7c3474

Please sign in to comment.