Last active
October 15, 2021 16:03
-
-
Save xtiannyeto/b1e01797cb2c2daf40c98280cb1f48ab to your computer and use it in GitHub Desktop.
app.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Button, createTheme, ThemeProvider } from '@mui/material'; | |
import React from 'react'; | |
import './App.scss'; | |
import styles from './style.module.scss'; | |
function App() { | |
const theme = createTheme({ | |
palette: { | |
primary: { | |
main: styles.colorPrimary | |
}, | |
secondary: { | |
main: styles.colorSecondary | |
}, | |
error: { | |
main: styles.colorDanger | |
} | |
} | |
}); | |
return ( | |
<div className="App"> | |
<ThemeProvider theme={theme}> | |
<Button variant="contained">primary</Button> | |
<Button color="secondary" variant="contained"> | |
secondary | |
</Button> | |
<Button color="error" variant="contained"> | |
danger | |
</Button> | |
</ThemeProvider> | |
</div> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment