-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add useWindowDimensions. * Fix tooltip position on RTL. * Fix UIMenu android position. * Move useDimensions to kit.layout.
- Loading branch information
1 parent
3661ad4
commit a7e4c76
Showing
11 changed files
with
60 additions
and
52 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
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
File renamed without changes.
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
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,14 @@ | ||
import { useDimensions } from '@tonlabs/uikit.layout'; | ||
|
||
export function useWindowDimensions() { | ||
/** | ||
* On different platforms it behave differently. | ||
* | ||
* On iOS it seems `windowHeight` is equal to `screenHeight`. | ||
* | ||
* On Android `windowHeight` doesn't include a status bar height and | ||
* a navigation bar (the one on the bottom). Since we use edge-to-edge | ||
* right now we want to use `screenHeight` to be fullscreen. | ||
*/ | ||
return useDimensions().screen; | ||
} |
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,11 @@ | ||
import { useDimensions } from '@tonlabs/uikit.layout'; | ||
|
||
export function useWindowDimensions() { | ||
/** | ||
* On different platforms it behave differently. | ||
* | ||
* On web `screenHeight` is equal to a device screen height | ||
* a browser window is usually smaller (and can be resized). | ||
*/ | ||
return useDimensions().window; | ||
} |