Added global decorator for storybook wrapping stories with the MUI theme (#556)

This commit is contained in:
Sebastian Qvarfordt
2020-04-15 17:08:03 +02:00
committed by GitHub
parent d5625f87bd
commit 29239b1877
+10
View File
@@ -0,0 +1,10 @@
import React from 'react';
import { addDecorator } from '@storybook/react';
import { BackstageTheme } from '@backstage/theme';
import { CssBaseline, ThemeProvider } from '@material-ui/core';
addDecorator(story => (
<ThemeProvider theme={BackstageTheme}>
<CssBaseline>{story()}</CssBaseline>
</ThemeProvider>
));