Created
December 30, 2019 09:46
-
-
Save Vivek205/671182c1be5747fb9701b8fb2f0019d1 to your computer and use it in GitHub Desktop.
src/stories/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { addDecorator } from "@storybook/react"; | |
import ProviderWrapper from "./Providers"; | |
import MuiTheme from "../assets/MuiTheme"; | |
const withProviders = story => <ProviderWrapper theme={MuiTheme}>{story()}</ProviderWrapper>; | |
addDecorator(withProviders); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { ThemeProvider as MuiThemeProvider } from "@material-ui/styles"; | |
const ProviderWrapper = ({ children, theme }) => <MuiThemeProvider theme={theme}>{children}</MuiThemeProvider>; | |
export default ProviderWrapper; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment