Implement utility helper for checking viewport size in js

This commit is contained in:
sdtsui 2017-08-08 17:50:29 -07:00
parent 928adae104
commit e260ab46cb
1 changed files with 5 additions and 0 deletions

5
ui/lib/is-mobile-view.js Normal file
View File

@ -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