gov-ui-core 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,11 @@
1
1
  import type { StorybookConfig } from "@storybook/react-webpack5";
2
- import path from 'path';
2
+ import { resolve } from 'path';
3
3
 
4
4
  const config: StorybookConfig = {
5
- stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
5
+ stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
6
6
  addons: [
7
- "@storybook/preset-create-react-app",
7
+ "@storybook/addon-webpack5-compiler-swc",
8
8
  "@storybook/addon-onboarding",
9
- "@storybook/addon-links",
10
9
  "@storybook/addon-essentials",
11
10
  "@chromatic-com/storybook",
12
11
  "@storybook/addon-interactions",
@@ -15,17 +14,22 @@ const config: StorybookConfig = {
15
14
  name: "@storybook/react-webpack5",
16
15
  options: {},
17
16
  },
18
- docs: {
19
- autodocs: true,
20
- },
17
+ docs: {},
21
18
  staticDirs: ["../public"],
22
19
  webpackFinal: async (config) => {
23
20
  if (config.resolve) {
24
21
  config.resolve.alias = {
25
22
  ...config.resolve?.alias,
26
- '@': path.resolve(__dirname, '../src'),
23
+ '@': resolve(__dirname, '../src'),
27
24
  };
28
25
  }
26
+ if (config.module?.rules) {
27
+ config.module.rules.push({
28
+ test: /\.scss$/,
29
+ use: ['style-loader', 'css-loader', 'sass-loader'],
30
+ include: resolve(__dirname, '../'),
31
+ });
32
+ }
29
33
  return config;
30
34
  },
31
35
  };
@@ -1,6 +1,8 @@
1
+ import React from 'react';
1
2
  import type { Preview } from "@storybook/react";
2
3
  import ThemeProvider from '../src/components/ThemeProvider';
3
4
 
5
+
4
6
  const preview: Preview = {
5
7
  parameters: {
6
8
  controls: {
@@ -10,13 +12,16 @@ const preview: Preview = {
10
12
  },
11
13
  },
12
14
  },
15
+
13
16
  decorators: [
14
17
  (Story) => (
15
18
  <ThemeProvider>
16
19
  <Story />
17
20
  </ThemeProvider>
18
21
  )
19
- ]
22
+ ],
23
+
24
+ tags: ['autodocs']
20
25
  };
21
26
 
22
27
  export default preview;