Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update customizing example #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions packages/gatsby-theme-material-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,21 @@ For `<Button>`s with [`href` URLs](https://material-ui.com/api/button/#props), u
Create & Edit src/gatsby-theme-material-ui-top-layout/components/top-layout.js

```javascript
import React from "react";
import { Provider } from "react-redux";
import ThemeTopLayout from "gatsby-theme-material-ui-top-layout/src/components/top-layout";

import createStore from "../../state/createStore";
import React from 'react';
import CssBaseline from '@mui/material/CssBaseline';
import { ThemeProvider } from '@mui/material/styles';
import Viewport from 'gatsby-theme-material-ui-top-layout/src/components/viewport.js'

export default function TopLayout({ children, theme }) {
const store = createStore();

return (
<Provider store={store}>
<ThemeTopLayout theme={theme}>{children}</ThemeTopLayout>
</Provider>
<>
<Viewport />
<ThemeProvider theme={theme}>
{/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */}
<CssBaseline />
{children}
</ThemeProvider>
</>
);
}
```
Expand Down