@cloudflare/util-responsive
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -15,1 +15,2 @@ import { variables as theme } from '@cloudflare/style-const'; | ||
export declare const useBreakpoint: (acceptedBreakpoints?: ("tablet" | "desktop" | "mobile" | "mobileWide" | "tabletLegacy" | "tabletWide" | "desktopLegacy" | "desktopLarge")[] | undefined) => "tablet" | "desktop" | "mobile" | "mobileWide" | "tabletLegacy" | "tabletWide" | "desktopLegacy" | "desktopLarge"; | ||
export declare const useIsMobile: () => boolean; |
@@ -45,2 +45,3 @@ import { useState } from 'react'; | ||
return breakpoint; | ||
}; | ||
}; | ||
export var useIsMobile = () => useBreakpoint(['mobile', 'tablet']) === 'mobile'; |
@@ -12,3 +12,3 @@ "use strict"; | ||
}); | ||
exports.useBreakpoint = exports.isMobile = exports.isBefore = exports.getCurrentBreakpoint = exports.breakpointValues = exports.breakpointKeys = exports.bodyFontSize = void 0; | ||
exports.useIsMobile = exports.useBreakpoint = exports.isMobile = exports.isBefore = exports.getCurrentBreakpoint = exports.breakpointValues = exports.breakpointKeys = exports.bodyFontSize = void 0; | ||
Object.defineProperty(exports, "withAutoWidth", { | ||
@@ -106,2 +106,8 @@ enumerable: true, | ||
exports.useBreakpoint = useBreakpoint; | ||
exports.useBreakpoint = useBreakpoint; | ||
var useIsMobile = function useIsMobile() { | ||
return useBreakpoint(['mobile', 'tablet']) === 'mobile'; | ||
}; | ||
exports.useIsMobile = useIsMobile; |
{ | ||
"name": "@cloudflare/util-responsive", | ||
"description": "Cloudflare Responsive Design Utils", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
Sorry, the diff of this file is too big to display
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
141767
380