Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca556a8

Browse files
committed
fixup! chore: fix storybook fonts
1 parent c590edb commit ca556a8

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

site/.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
// addons are official and community plugins to extend Storybook.
1515
//
1616
// SEE: https://storybook.js.org/addons
17-
addons: ["@storybook/addon-links", "@storybook/addon-essentials", "@react-theming/storybook-addon"],
17+
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
1818

1919
// Storybook uses babel under the hood, while we currently use ts-loader.
2020
// Sometimes, you may encounter an error in a Storybook that contains syntax

site/.storybook/preview.js

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { CssBaseline } from "@material-ui/core"
2-
import { createMuiTheme } from "@material-ui/core/styles"
1+
import CssBaseline from "@material-ui/core/CssBaseline"
32
import ThemeProvider from "@material-ui/styles/ThemeProvider"
43
import { withThemes } from "@react-theming/storybook-addon"
54
import { createMemoryHistory } from "history"
@@ -8,15 +7,12 @@ import { unstable_HistoryRouter as HistoryRouter } from "react-router-dom"
87
import { dark, light } from "../src/theme"
98
import "../src/theme/global-fonts"
109

11-
const providerFn = ({ theme, children }) => {
12-
const muiTheme = createMuiTheme(theme)
13-
return (
14-
<ThemeProvider theme={muiTheme}>
15-
<CssBaseline />
16-
{children}
17-
</ThemeProvider>
18-
)
19-
}
10+
const providerFn = ({ children, theme }) => (
11+
<ThemeProvider theme={theme}>
12+
<CssBaseline />
13+
{children}
14+
</ThemeProvider>
15+
)
2016

2117
addDecorator(withThemes(null, [light, dark], { providerFn }))
2218

0 commit comments

Comments
 (0)