Skip to content

Commit

Permalink
storybook upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tmanundercover committed Sep 27, 2023
1 parent b26bc46 commit 2bdc6c5
Show file tree
Hide file tree
Showing 51 changed files with 14,696 additions and 18,823 deletions.
13 changes: 0 additions & 13 deletions .storybook/main.js

This file was deleted.

19 changes: 19 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// .storybook/main.ts

// Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
import { StorybookConfig } from '@storybook/react-webpack5';

const config: StorybookConfig = {
framework: '@storybook/react-webpack5',
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
// Other Storybook addons
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app",
'storybook-addon-material-ui',
"@storybook/addon-mdx-gfm"
],
};

export default config;
32 changes: 0 additions & 32 deletions .storybook/preview.js

This file was deleted.

54 changes: 54 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import {muiTheme} from "storybook-addon-material-ui";
import MackenziesMindTheme from "../src/theme/DigitalResumeTheme";
import {QueryClient, QueryClientProvider} from "react-query";
import {BrowserRouter} from "react-router-dom";
//
// export const parameters = {
// actions: {argTypesRegex: "^on[A-Z].*"},
// controls: {
// matchers: {
// color: /(background|color)$/i,
// date: /Date$/,
// },
// },
// }
//
const mockedQueryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
},
});
//
// export const decorators = [
// (Story) => (
// <QueryClientProvider client={mockedQueryClient}>
// <BrowserRouter>
// <Story/>
// </BrowserRouter>
// </QueryClientProvider>),
// muiTheme([MackenziesMindTheme]),
// ];


import React from 'react';

import { Preview } from '@storybook/react';
import {MuiThemeProvider} from "@material-ui/core";
import DigitalResumeTheme from "../src/theme/DigitalResumeTheme";

const preview: Preview = {
decorators: [
(Story) => (
<QueryClientProvider client={mockedQueryClient}>
<BrowserRouter>
<MuiThemeProvider theme={DigitalResumeTheme}><Story/></MuiThemeProvider>
</BrowserRouter>
</QueryClientProvider>
),

],
};

export default preview;
Loading

0 comments on commit 2bdc6c5

Please sign in to comment.