@alfalab/core-components-mq
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -20,6 +20,6 @@ 'use strict'; | ||
var handleMatchChange = function () { return setMatches(mql.matches); }; | ||
mql.addEventListener('change', handleMatchChange); | ||
mql.addListener(handleMatchChange); | ||
handleMatchChange(); | ||
return function () { | ||
mql.removeEventListener('change', handleMatchChange); | ||
mql.removeListener(handleMatchChange); | ||
utils.releaseMatchMedia(query); | ||
@@ -26,0 +26,0 @@ }; |
@@ -13,6 +13,6 @@ import { useState, useEffect } from 'react'; | ||
const handleMatchChange = () => setMatches(mql.matches); | ||
mql.addEventListener('change', handleMatchChange); | ||
mql.addListener(handleMatchChange); | ||
handleMatchChange(); | ||
return () => { | ||
mql.removeEventListener('change', handleMatchChange); | ||
mql.removeListener(handleMatchChange); | ||
releaseMatchMedia(query); | ||
@@ -19,0 +19,0 @@ }; |
@@ -20,6 +20,6 @@ 'use strict'; | ||
var handleMatchChange = function () { return setMatches(mql.matches); }; | ||
mql.addEventListener('change', handleMatchChange); | ||
mql.addListener(handleMatchChange); | ||
handleMatchChange(); | ||
return function () { | ||
mql.removeEventListener('change', handleMatchChange); | ||
mql.removeListener(handleMatchChange); | ||
utils.releaseMatchMedia(query); | ||
@@ -26,0 +26,0 @@ }; |
{ | ||
"name": "@alfalab/core-components-mq", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "", | ||
@@ -17,3 +17,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "f5b4299dc3e4442743e132f54bbdf3cb48c8d1ef" | ||
"gitHead": "fd7f4e4583ae8a5fe223a1630869ac3fc41f175e" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18767