Skip to content

Commit

Permalink
Merge pull request #3 from theHandsomestNerd/material-ui-upgrade
Browse files Browse the repository at this point in the history
Material UI upgrade
  • Loading branch information
tmanundercover authored Oct 11, 2023
2 parents e74f9c3 + a95d333 commit 38af6f7
Show file tree
Hide file tree
Showing 429 changed files with 18,416 additions and 12,775 deletions.
4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config: StorybookConfig = {
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app",
'storybook-addon-material-ui',
// 'storybook-addon-material-ui',
"@storybook/addon-mdx-gfm",
'@storybook/addon-styling'
],
Expand Down
69 changes: 16 additions & 53 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,81 +1,44 @@
import DigitalResumeTheme from "../src/theme/DigitalResumeTheme";
import {QueryClient, QueryClientProvider} from "react-query";
import {BrowserRouter, Navigate, Route, Routes} from "react-router-dom";
import {BrowserRouter} from "react-router-dom";
import React from 'react';

import {Preview} from '@storybook/react';
import {CssBaseline, Grid, MuiThemeProvider} from "@material-ui/core";
import WebDevSiteTheme from "../src/theme/WebDevSiteTheme";
import TransformHWTheme from "../src/theme/TransformHWTheme";
import {withThemeFromJSXProvider} from "@storybook/addon-styling";
import PageProvider from "../src/components/page-context/PageProvider";
import HomePageResumeData from "../src/stories/data/HomePageData";
import ModalProvider from "../src/components/snackbar-context/ModalProvider";
import SnackbarProvider
from "../src/components/modal-context/SnackbarProvider";
import MediaQueriesProvider from "../src/components/media-queries-context/MediaQueriesProvider";
import SnackbarProvider from "../src/components/modal-context/SnackbarProvider";
import AmenityProvider from "../src/components/amenity-context/AmenityProvider";
import PageMux from "../src/components/mackenzies-mind/pages/PageMux";
import FourOhFour from "../src/components/transform-hw/pages/error-page/FourOhFour";
import {RoutesEnum} from "../src/App";
//
// export const parameters = {
// actions: {argTypesRegex: "^on[A-Z].*"},
// controls: {
// matchers: {
// color: /(background|color)$/i,
// date: /Date$/,
// },
// },
// }
//
import {CssBaseline} from "@mui/material";
import CustomizedThemeProvider from "../src/components/customized-theme-provider/CustomizedThemeProvider";
import DigitalResumeThemeData from "../src/stories/data/DigitalResumeThemeData";

const mockedQueryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
},
});
//
// export const decorators = [
// (Story) => (
// <QueryClientProvider client={mockedQueryClient}>
// <BrowserRouter>
// <Story/>
// </BrowserRouter>
// </QueryClientProvider>),
// muiTheme([MackenziesMindTheme]),
// ];

const preview: Preview = {
decorators: [
(Story) => (
<BrowserRouter>
<QueryClientProvider client={mockedQueryClient}>
<SnackbarProvider>
<MediaQueriesProvider>
<ModalProvider>
<PageProvider page={HomePageResumeData}>
<PageProvider page={HomePageResumeData}>
<CustomizedThemeProvider pageTheme={DigitalResumeThemeData}>
<CssBaseline/>
<SnackbarProvider>
<ModalProvider>
<AmenityProvider>
<Story />
<Story/>
</AmenityProvider>
</PageProvider>
</ModalProvider>
</MediaQueriesProvider>
</SnackbarProvider>
</ModalProvider>
</SnackbarProvider>
</CustomizedThemeProvider>
</PageProvider>
</QueryClientProvider>
</BrowserRouter>
),
withThemeFromJSXProvider({
themes: {
webDev: WebDevSiteTheme,
resume: DigitalResumeTheme,
thw: TransformHWTheme
},
Provider: MuiThemeProvider,
GlobalStyles: CssBaseline,
})
// muiTheme([DigitalResumeTheme, WebDevSiteTheme, TransformHWTheme])
],
};

Expand Down
Loading

0 comments on commit 38af6f7

Please sign in to comment.