Skip to content

Commit

Permalink
Added global theme decorator to preview.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wrigh393 committed Mar 12, 2021
1 parent 1e716bf commit 365b4e1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
import React from "react";
import ItemProvider from '../src/components/ItemProvider';
import { ThemeProvider } from "@material-ui/core/styles";
import webqueueTheme from "../src/theme";

const theme = webqueueTheme();

export const decorators = [
(Story) => (
<ItemProvider>
<Story />
</ItemProvider>
),
(Story) => (
<ThemeProvider theme={theme}>
<Story />
</ThemeProvider>
),
];

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
options: {
storySort: {
method: 'alphabetical',
order: ['Introduction', 'Components']
},

},
}

0 comments on commit 365b4e1

Please sign in to comment.