How to use react-media-match - 1 common examples

To help you get started, weโ€™ve selected a few react-media-match examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kata-ai / kata-platform-docs / src / utils / mediaQuery.ts View on Github external
import { createMediaMatcher } from 'react-media-match';
import theme from '../styles/theme';

const MediaQuery = createMediaMatcher({
  mobile: `(max-width: ${theme.breakpoints.md - 1}px)`,
  tablet: `(max-width: ${theme.breakpoints.lg - 1}px)`,
  desktop: `(min-width: ${theme.breakpoints.lg}px)`
});

export default MediaQuery;

react-media-match

React made responsible

MIT
Latest version published 7 months ago

Package Health Score

58 / 100
Full package analysis

Popular react-media-match functions