Skip to content

Commit

Permalink
fix: extract type
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Sep 22, 2023
1 parent 1d24ec4 commit 8544d6f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/Accessibility/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import {useEffect, useState, useCallback} from 'react';
import {AccessibilityInfo, LayoutChangeEvent} from 'react-native';
import moveAccessibilityFocus from './moveAccessibilityFocus';

type HitSlop = {x: number; y: number};

const useScreenReaderStatus = (): boolean => {
const [isScreenReaderEnabled, setIsScreenReaderEnabled] = useState(false);
useEffect(() => {
Expand All @@ -15,7 +17,7 @@ const useScreenReaderStatus = (): boolean => {
return isScreenReaderEnabled;
};

const getHitSlopForSize = ({x, y}: {x: number; y: number}) => {
const getHitSlopForSize = ({x, y}: HitSlop) => {
/* according to https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/adaptivity-and-layout/
the minimum tappable area is 44x44 points */
const minimumSize = 44;
Expand Down

0 comments on commit 8544d6f

Please sign in to comment.