Skip to content

Commit

Permalink
fix: add jsdocs definitions for the new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Mar 21, 2023
1 parent 8e84ce8 commit 0befe08
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libs/getSafeAreaPaddingTop/index.android.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import {StatusBar} from 'react-native';

/**
* Returns safe area padding top to use for a View
*
* @param {Object} insets
* @param {Boolean} statusBarTranslucent
* @returns {Number}
*/
export default function getSafeAreaPaddingTop(insets, statusBarTranslucent) {
return (statusBarTranslucent && StatusBar.currentHeight) || 0;
}
6 changes: 6 additions & 0 deletions src/libs/getSafeAreaPaddingTop/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* Takes safe area insets and returns padding top to use for a View
*
* @param {Object} insets
* @returns {Number}
*/
export default function getSafeAreaPaddingTop(insets) {
return insets.top;
}

0 comments on commit 0befe08

Please sign in to comment.