mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
18 lines
438 B
JavaScript
18 lines
438 B
JavaScript
|
var mobileQuery = matchMedia('(max-width: 800px)'),
|
||
|
|
||
|
responsiveAction = function responsiveAction(event, mediaCondition, cb) {
|
||
|
if (!window.matchMedia(mediaCondition).matches) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
event.preventDefault();
|
||
|
event.stopPropagation();
|
||
|
cb();
|
||
|
};
|
||
|
|
||
|
export { mobileQuery, responsiveAction };
|
||
|
export default {
|
||
|
mobileQuery: mobileQuery,
|
||
|
responsiveAction: responsiveAction
|
||
|
};
|