summaryrefslogtreecommitdiff
path: root/storybook/config/preview.js
blob: 6f3b81907422c2e215579ddcb5312a7f141c5f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { withServer } from 'storybook-mirage'; // eslint-disable-line import/no-unresolved
import Vue from 'vue';
import { createMockServer } from 'test_helpers/mock_server';
import translateMixin from '~/vue_shared/translate';

const stylesheetsRequireCtx = require.context(
  '../../app/assets/stylesheets',
  true,
  /(application|application_utilities|highlight\/themes\/white)\.scss$/,
);

window.gon = {
  user_color_scheme: 'white',
};
translateMixin(Vue);

stylesheetsRequireCtx('./application.scss');
stylesheetsRequireCtx('./application_utilities.scss');
stylesheetsRequireCtx('./highlight/themes/white.scss');

export const decorators = [withServer(createMockServer)];