MetaMask / MetaMask/metamask-extension

Create `useMediaQuery` hook

Open
#19,523 0 comments 0 reactions 1 assignee Claimed by @georgewrmarshall View on GitHub
team-design-system
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

### Description
Currently to conditionally render UI based on popup view we use
```
const popupStatus = getEnvironmentType() === ENVIRONMENT_TYPE_POPUP;
```
This is less than ideal because it is limited to popup view when it should be based on the window size. There may be situations where the extension is used on a small screen outside of the pop view.

### Technical Details
- Create a react hook to help conditionally render UI at different breakpoints

### Acceptance Criteria
- A hook is created that allows for conditional rendering of UI
- The conditional rendering of UI works on screen size not env variables

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.