@shopify/polaris
Version:
Shopify’s product component library
26 lines (22 loc) • 705 B
JavaScript
var Breakpoints = {
navigationBarCollapsed: '768px',
stackedContent: '1043px'
};
var noWindowMatches = {
media: '',
addListener: noop,
removeListener: noop,
matches: false,
onchange: noop,
addEventListener: noop,
removeEventListener: noop,
dispatchEvent: _ => true
};
function noop() {}
function navigationBarCollapsed() {
return typeof window === 'undefined' ? noWindowMatches : window.matchMedia("(max-width: ".concat(Breakpoints.navigationBarCollapsed, ")"));
}
function stackedContent() {
return typeof window === 'undefined' ? noWindowMatches : window.matchMedia("(max-width: ".concat(Breakpoints.stackedContent, ")"));
}
export { navigationBarCollapsed, stackedContent };