diff options
author | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-09 08:50:29 +0800 |
---|---|---|
committer | sdtsui <szehungdanieltsui@gmail.com> | 2017-08-09 08:50:29 +0800 |
commit | e260ab46cb370c3a74797f86957b5fecefda9188 (patch) | |
tree | afe0673a1c0ec6255bdc90674a1db22ec34c0f18 /ui/lib | |
parent | 928adae1042addb8cf123879dd8ec50928ac456f (diff) | |
download | tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar.gz tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar.bz2 tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar.lz tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar.xz tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.tar.zst tangerine-wallet-browser-e260ab46cb370c3a74797f86957b5fecefda9188.zip |
Implement utility helper for checking viewport size in js
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/is-mobile-view.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/lib/is-mobile-view.js b/ui/lib/is-mobile-view.js new file mode 100644 index 000000000..8a8591c1a --- /dev/null +++ b/ui/lib/is-mobile-view.js @@ -0,0 +1,5 @@ +// Checks if viewport at invoke time fits mobile dimensions +// isMobileView :: () => Bool +const isMobileView = () => window.matchMedia("screen and (max-width: 575px)").matches + +module.exports = isMobileView
\ No newline at end of file |