Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cieloazul310/gatsby-material-ui-darkmode
https://github.com/cieloazul310/gatsby-material-ui-darkmode
gatsby material-ui
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cieloazul310/gatsby-material-ui-darkmode
- Owner: cieloazul310
- Created: 2020-02-05T07:37:08.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-03-04T05:55:26.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T20:19:56.198Z (9 months ago)
- Topics: gatsby, material-ui
- Language: JavaScript
- Homepage: https://cieloazul310.github.io/gatsby-material-ui-darkmode/
- Size: 3.72 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatsby MUI dark mode example
[Gatsby] [MUI] dark mode example
## How to use
```sh
$ git clone [email protected]:cieloazul310/gatsby-material-ui-darkmode.git
$ cd gatsby-material-ui-darkmode# develop
$ yarn run develop# build
$ yarn run build
```## Toggle color mode
```jsx
import * as React from 'react';
import Button from '@mui/material/Button';
import ColorModeContext from './ColorModeContext';function ToggleButton() {
const colorMode = React.useContext(ColorModeContext);
return (
Toggle Color Mode
);
}
```[MUI]: https://mui.com "MUI"
[Gatsby]: https://www.gatsbyjs.org "Gatsby"