Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect orientation on media query #68

Merged
merged 1 commit into from
Aug 15, 2021
Merged

Conversation

hyochan
Copy link
Member

@hyochan hyochan commented Aug 15, 2021

Description

When testing the orientaion is not detected with isMobile, isTablet and isDesktop which we've defined. Therefore it looks we need to expose variable isPortrait to also detect the orientation.

Then we can provide different layouts in below cases.
Screen Shot 2021-08-15 at 3 10 17 PM

Screen Shot 2021-08-15 at 3 10 30 PM

Make sure to import '@expo/match-media'; in your app to use this feature.

Related Issues

N/A

Checklist

Before you create this PR confirms that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • Run yarn test or yarn test -u if you need to update snapshot.
  • Run yarn lint
  • I am willing to follow-up on review comments in a timely manner.

@hyochan hyochan added the 🍗 enhancement New feature or request label Aug 15, 2021
@codecov
Copy link

codecov bot commented Aug 15, 2021

Codecov Report

Merging #68 (702e232) into master (89adf9b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   95.37%   95.37%           
=======================================
  Files          21       21           
  Lines         541      541           
  Branches      232      232           
=======================================
  Hits          516      516           
  Misses         25       25           

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit 702e232):

https://dooboo-ui--pr68-media-query-orientat-bqd1se9q.web.app

(expires Sun, 29 Aug 2021 06:12:45 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@hyochan hyochan merged commit f0edd1a into master Aug 15, 2021
@hyochan hyochan deleted the media-query/orientation branch August 15, 2021 06:13
@hyochan hyochan added the 🎯 feature New feature label Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍗 enhancement New feature or request 🎯 feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant