Skip to content

[docs] Fix CssBaseline import in example code#33614

Merged
ZeeshanTamboli merged 1 commit intomui:masterfrom
dd-ssc:patch-1
Jul 22, 2022
Merged

[docs] Fix CssBaseline import in example code#33614
ZeeshanTamboli merged 1 commit intomui:masterfrom
dd-ssc:patch-1

Conversation

@dd-ssc
Copy link
Copy Markdown
Contributor

@dd-ssc dd-ssc commented Jul 22, 2022

First code example on page uses
import { ThemeProvider, createTheme, CssBaseline } from '@mui/material/styles';
which fails with
export 'CssBaseline' (imported as 'CssBaseline') was not found in '@mui/material/styles' ... .

Presumably, CssBaseline was moved recently and the first code example was not updated correspondingly; last code example on page is fine.

Preview: https://deploy-preview-33614--material-ui.netlify.app/material-ui/customization/dark-mode/#dark-mode-by-default

First code example on page uses
  `import { ThemeProvider, createTheme, CssBaseline } from '@mui/material/styles';`
which fails with
  `export 'CssBaseline' (imported as 'CssBaseline') was not found in '@mui/material/styles' ... `.

Presumably, `CssBaseline` was moved recently and the first code example was not updated correspondingly; last code example on page is fine.
@mui-bot
Copy link
Copy Markdown

mui-bot commented Jul 22, 2022

No bundle size changes

Generated by 🚫 dangerJS against 678778c

@ZeeshanTamboli ZeeshanTamboli added the docs Improvements or additions to the documentation. label Jul 22, 2022
@ZeeshanTamboli ZeeshanTamboli changed the title fix CssBaseline import in example code [docs] Fix CssBaseline import in example code Jul 22, 2022
@ZeeshanTamboli ZeeshanTamboli added the type: bug It doesn't behave as expected. label Jul 22, 2022
Copy link
Copy Markdown
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Thanks for the first contribution.

@ZeeshanTamboli ZeeshanTamboli merged commit 394798b into mui:master Jul 22, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
fix CssBaseline import in example code

First code example on page uses
  `import { ThemeProvider, createTheme, CssBaseline } from '@mui/material/styles';`
which fails with
  `export 'CssBaseline' (imported as 'CssBaseline') was not found in '@mui/material/styles' ... `.

Presumably, `CssBaseline` was moved recently and the first code example was not updated correspondingly; last code example on page is fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants