-
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 #46860 from koko57/fix/46488-fix-modal-centering
Fix/46488 fix modal centering
- Loading branch information
Showing
6 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
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
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
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 @@ | ||
const HEADER_HEIGHT = 80; | ||
const BUTTON_HEIGHT = 40; | ||
const BUTTON_MARGIN = 12; | ||
|
||
export {HEADER_HEIGHT, BUTTON_HEIGHT, BUTTON_MARGIN}; |
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,10 @@ | ||
import useSafeAreaInsets from '@hooks/useSafeAreaInsets'; | ||
import {BUTTON_HEIGHT, BUTTON_MARGIN, HEADER_HEIGHT} from './const'; | ||
|
||
function useEmptyViewHeaderHeight(isSmallScreenWidth: boolean): number { | ||
const safeAreaInsets = useSafeAreaInsets(); | ||
|
||
return isSmallScreenWidth ? HEADER_HEIGHT + BUTTON_HEIGHT + BUTTON_MARGIN + safeAreaInsets.top : HEADER_HEIGHT; | ||
} | ||
|
||
export default useEmptyViewHeaderHeight; |
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,7 @@ | ||
import {BUTTON_HEIGHT, BUTTON_MARGIN, HEADER_HEIGHT} from './const'; | ||
|
||
function useEmptyViewHeaderHeight(isSmallScreenWidth: boolean): number { | ||
return isSmallScreenWidth ? HEADER_HEIGHT + BUTTON_HEIGHT + BUTTON_MARGIN : HEADER_HEIGHT; | ||
} | ||
|
||
export default useEmptyViewHeaderHeight; |
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