useMedia
useMedia
is a custom hook to handle media queries. It utilizes json2mq to parse a string or object into json.
The useMedia hook returns an object with the following fields:
Name | Type | Default | Description |
---|---|---|---|
match | boolean | True if the media query matches, false otherwise. |
import { useMedia } from 'minerva-ui';