AlexandreBonaventure / vue-mq

📱 💻 Define your breakpoints and build responsive design semantically and declaratively in a mobile-first way with Vue.
https://alexandrebonaventure.github.io/vue-mq
MIT License
537 stars 59 forks source link

Creating isMobile / isTablet, etc #80

Open demiro opened 2 years ago

demiro commented 2 years ago

How can I extend the global $mq object with reactive isMobile / isTablet / isWide, etc properties?

I want to be able to use it similar to $device.isMobile from Nuxt

<div v-if="$mq.isMobile"> ...

and not the long version like

<div v-if="$mq === mobile"> ...

Any idea on how could I extend it to be working like this?