@shopware-ag/meteor-component-library
Version:
The meteor component library is a Vue component library developed by Shopware. It is based on the [Meteor Design System](https://shopware.design/).
21 lines (16 loc) • 428 B
text/typescript
import type { Plugin } from "vue";
// @ts-expect-error
import DeviceHelper from "../helper/device.helper";
const DeviceHelperPlugin: Plugin = {
install(app) {
const deviceHelper = new DeviceHelper();
app.config.globalProperties.$device = deviceHelper;
app.mixin({
unmounted() {
this.$device.removeResizeListener(this);
},
});
return true;
},
};
export default DeviceHelperPlugin;