-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
11 changed files
with
195 additions
and
309 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,13 @@ | ||
import { useMediaQuery } from 'react-responsive'; | ||
import useMedia from './use-media'; | ||
import { theme } from '../theme/docsTheme'; | ||
|
||
export default function useScreenSize() { | ||
const isSmallScreen = useMediaQuery({ query: '(max-width: 750px)' }); | ||
const isTabletOrMobile = useMediaQuery({ query: '(max-width: 1224px)' }); | ||
const isMobile = useMedia(theme.screenSize.upToSmall); | ||
// const isDesktopOrLaptop = useMediaQuery({ query: '(min-device-width: 1224px)' }); | ||
// const isBigScreen = useMediaQuery({ query: '(min-device-width: 1824px)' }); | ||
// const isTabletOrMobileDevice = useMediaQuery({ query: '(max-device-width: 1224px)' }); | ||
// const isPortrait = useMediaQuery({ query: '(orientation: portrait)' }); | ||
// const isRetina = useMediaQuery({ query: '(min-resolution: 2dppx)' }); | ||
const isTabletOrMobile = useMedia(theme.screenSize.upToLarge); | ||
|
||
const screen = { | ||
isMobile, | ||
isTabletOrMobile, | ||
isSmallScreen, | ||
}; | ||
return 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
Oops, something went wrong.