styled-breakpoints
Advanced tools
Comparing version 14.1.2 to 14.1.3
{ | ||
"name": "styled-breakpoints", | ||
"version": "14.1.2", | ||
"version": "14.1.3", | ||
"license": "MIT", | ||
@@ -70,5 +70,5 @@ "description": "Simple and powerful css breakpoints for styled-components and emotion", | ||
"@size-limit/webpack": "^11.0.2", | ||
"@testing-library/dom": "^9.2.0", | ||
"@testing-library/dom": "^10.0.0", | ||
"@testing-library/jest-dom": "^6.0.0", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/react": "^15.0.0", | ||
"@vitest/coverage-istanbul": "^1.0.1", | ||
@@ -90,3 +90,3 @@ "@vitest/coverage-v8": "^1.0.1", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-vitest": "^0.3.10", | ||
"eslint-plugin-vitest": "^0.4.0", | ||
"git-cz": "^4.9.0", | ||
@@ -93,0 +93,0 @@ "husky": "^8.0.3", |
@@ -18,3 +18,3 @@ const { useState, useLayoutEffect, useEffect } = require('react'); | ||
function useMediaQuery(query) { | ||
const [state, setState] = useState(IS_BROWSER && getInitialState(query)); | ||
const [isMatch, setIsMatch] = useState(IS_BROWSER && getInitialState(query)); | ||
@@ -30,7 +30,9 @@ useEnhancedEffect(() => { | ||
/* istanbul ignore next */ | ||
setState(mediaQueryList.matches); | ||
setIsMatch(mediaQueryList.matches); | ||
}; | ||
setState(mediaQueryList.matches); | ||
mediaQueryList.addEventListener('change', handleChange); | ||
setIsMatch(mediaQueryList.matches); | ||
return () => { | ||
@@ -43,3 +45,3 @@ mounted = false; | ||
return state; | ||
return isMatch; | ||
} | ||
@@ -46,0 +48,0 @@ |
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
36382
405