gitlab-org--gitlab-foss/spec/javascripts/helpers/vue_mount_component_helper.js
2018-04-08 10:20:05 +00:00

14 lines
377 B
JavaScript

export const createComponentWithStore = (Component, store, propsData = {}) => new Component({
store,
propsData,
});
export const mountComponentWithStore = (Component, { el, props, store }) =>
new Component({
store,
propsData: props || { },
}).$mount(el);
export default (Component, props = {}, el = null) => new Component({
propsData: props,
}).$mount(el);