-
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 #25858 from pasyukevich/migrate-ts/get-pop-over
[No QA] [TS migration] Migrate 'getPopOverVerticalOffset' style to TypeScript
- Loading branch information
Showing
4 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
...getPopOverVerticalOffset/index.desktop.js → ...getPopOverVerticalOffset/index.desktop.ts
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import CONST from '../../CONST'; | ||
import GetPopOverVerticalOffset from './types'; | ||
|
||
/** | ||
* Adds the header padding with vertical offset on desktop | ||
* @param {Number} vertical | ||
* @returns {Object} | ||
*/ | ||
export default (vertical) => ({ | ||
/** Adds the header padding with vertical offset on desktop */ | ||
const getPopOverVerticalOffset: GetPopOverVerticalOffset = (vertical) => ({ | ||
// We add CONST.DESKTOP_HEADER_GAP on desktop which we | ||
// need to add to vertical offset to have proper vertical | ||
// offset on desktop | ||
vertical: vertical + CONST.DESKTOP_HEADER_PADDING, | ||
}); | ||
|
||
export default getPopOverVerticalOffset; |
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,5 @@ | ||
import GetPopOverVerticalOffset from './types'; | ||
|
||
const getPopOverVerticalOffset: GetPopOverVerticalOffset = (vertical: number) => ({vertical}); | ||
|
||
export default getPopOverVerticalOffset; |
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 @@ | ||
type GetPopOverVerticalOffset = (vertical: number) => { | ||
vertical: number; | ||
}; | ||
|
||
export default GetPopOverVerticalOffset; |