-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26162 from software-mansion-labs/ts-migration/get…
…-window-height-adjustment [No QA] [TS migration] Migrate 'getWindowHeightAdjustment' lib to TypeScript
- Loading branch information
Showing
5 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import GetWindowHeightAdjustment from './types'; | ||
|
||
// On Android the window height does not include the status bar height, so we need to add it manually. | ||
const getWindowHeightAdjustment: GetWindowHeightAdjustment = (insets) => insets?.top ?? 0; | ||
|
||
export default getWindowHeightAdjustment; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import GetWindowHeightAdjustment from './types'; | ||
|
||
// Some platforms need to adjust the window height. | ||
const getWindowHeightAdjustment: GetWindowHeightAdjustment = () => 0; | ||
|
||
export default getWindowHeightAdjustment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {EdgeInsets} from 'react-native-safe-area-context'; | ||
|
||
type GetWindowHeightAdjustment = (insets: EdgeInsets | null) => number; | ||
|
||
export default GetWindowHeightAdjustment; |