https://github.com/ph-fritsche/repro-storybook-muitheme
https://github.com/ph-fritsche/repro-storybook-muitheme
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ph-fritsche/repro-storybook-muitheme
- Owner: ph-fritsche
- Created: 2021-10-13T12:57:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-13T15:16:29.000Z (over 3 years ago)
- Last Synced: 2025-02-28T16:36:25.252Z (4 months ago)
- Language: JavaScript
- Size: 238 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Material-UI theme does not work in Storybook**
1. Install
```
yarn install
```
2. Runa. CRA
```
yarn react-scripts start
```
b. Storybook
```
yarn start-storybook
```## Component
```jsx
import React from 'react'
import { Button } from '@mui/material'
import { ThemeProvider, createTheme } from '@mui/material/styles'export function ThemedButton() {
return (
foo
)
}
```## Result
In CRA | In Storybook
-- | --
 | ## Workaround
https://github.com/storybookjs/storybook/issues/10231#issuecomment-751239488