matchesMedia = ({ media }) =>
  media ? isBrowser && !!window.matchMedia(media).matches : false
Tries to detect if a media query matches the current viewport.
@property media   {{media?: string}}  A media query string.
@return {boolean}