Skip to content

Commit

Permalink
Merge pull request #26675 from software-mansion-labs/ts-migration/can…
Browse files Browse the repository at this point in the history
…FocusInputOnScreenFocus

[TS migration] Migrate 'canFocusInputOnScreenFocus' lib to TypeScript
  • Loading branch information
youssef-lr authored Sep 11, 2023
2 parents 6cdefbe + 293d073 commit ae68e74
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/libs/canFocusInputOnScreenFocus/index.js

This file was deleted.

1 change: 0 additions & 1 deletion src/libs/canFocusInputOnScreenFocus/index.native.js

This file was deleted.

5 changes: 5 additions & 0 deletions src/libs/canFocusInputOnScreenFocus/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import CanFocusInputOnScreenFocus from './types';

const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => false;

export default canFocusInputOnScreenFocus;
6 changes: 6 additions & 0 deletions src/libs/canFocusInputOnScreenFocus/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as DeviceCapabilities from '../DeviceCapabilities';
import CanFocusInputOnScreenFocus from './types';

const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => !DeviceCapabilities.canUseTouchScreen();

export default canFocusInputOnScreenFocus;
3 changes: 3 additions & 0 deletions src/libs/canFocusInputOnScreenFocus/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type CanFocusInputOnScreenFocus = () => boolean;

export default CanFocusInputOnScreenFocus;

0 comments on commit ae68e74

Please sign in to comment.