Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « vuex_store « addons « config « storybook - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 759c7c9b38facb42e075ff2968eefa7bc4e6b79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import Vuex from 'vuex'; // eslint-disable-line no-restricted-imports

const createVuexStore = (store) => new Vuex.Store(store);

/*
 * Story decorator for injecting a Vuex store
 */
export const withVuexStore = (story, context) => {
  Object.assign(context, { createVuexStore });
  return {
    components: {
      story,
    },
    template: `<story />`,
  };
};