@sanity/ui 3.0.0-static.17 → 3.0.0-static.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -282,9 +282,9 @@ function useMatchMedia(mediaQueryString, getServerSnapshot2) {
282
282
  let t1;
283
283
  return $[2] !== mediaQueryString ? (t1 = () => window.matchMedia(mediaQueryString).matches, $[2] = mediaQueryString, $[3] = t1) : t1 = $[3], react.useSyncExternalStore(t0, t1, getServerSnapshot2);
284
284
  }
285
- const media = [360, 600, 900, 1200, 1800, 2400];
285
+ const media = Object.values(css.BREAKPOINTS);
286
286
  function _getMediaQuery(media2, index) {
287
- return index === 0 ? `screen and (max-width: ${media2[index] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index - 1]}px)` : `screen and (min-width: ${media2[index - 1]}px) and (max-width: ${media2[index] - 1}px)`;
287
+ return index === 0 ? `screen and (max-width: ${media2[index + 1] - 1}px)` : index === media2.length ? `screen and (min-width: ${media2[index]}px)` : `screen and (min-width: ${media2[index]}px) and (max-width: ${media2[index + 1] - 1}px)`;
288
288
  }
289
289
  function _createMediaStore() {
290
290
  const mediaLen = media.length;