Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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"