diff --git a/src/styles/getPopOverVerticalOffset/index.desktop.js b/src/styles/getPopOverVerticalOffset/index.desktop.ts similarity index 51% rename from src/styles/getPopOverVerticalOffset/index.desktop.js rename to src/styles/getPopOverVerticalOffset/index.desktop.ts index bd58266d0bd0..d7c02f95b169 100644 --- a/src/styles/getPopOverVerticalOffset/index.desktop.js +++ b/src/styles/getPopOverVerticalOffset/index.desktop.ts @@ -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; diff --git a/src/styles/getPopOverVerticalOffset/index.js b/src/styles/getPopOverVerticalOffset/index.js deleted file mode 100644 index 2e7c4fbc07ff..000000000000 --- a/src/styles/getPopOverVerticalOffset/index.js +++ /dev/null @@ -1 +0,0 @@ -export default (vertical) => ({vertical}); diff --git a/src/styles/getPopOverVerticalOffset/index.ts b/src/styles/getPopOverVerticalOffset/index.ts new file mode 100644 index 000000000000..854653766cd2 --- /dev/null +++ b/src/styles/getPopOverVerticalOffset/index.ts @@ -0,0 +1,5 @@ +import GetPopOverVerticalOffset from './types'; + +const getPopOverVerticalOffset: GetPopOverVerticalOffset = (vertical: number) => ({vertical}); + +export default getPopOverVerticalOffset; diff --git a/src/styles/getPopOverVerticalOffset/types.ts b/src/styles/getPopOverVerticalOffset/types.ts new file mode 100644 index 000000000000..ba8b322faf26 --- /dev/null +++ b/src/styles/getPopOverVerticalOffset/types.ts @@ -0,0 +1,5 @@ +type GetPopOverVerticalOffset = (vertical: number) => { + vertical: number; +}; + +export default GetPopOverVerticalOffset;