Configure a theme via theme.js

This commit is contained in:
Ceda EI 2021-04-09 19:09:08 +05:30
parent 6127309db9
commit 2a84576cc5
2 changed files with 23 additions and 1 deletions

View File

@ -4,9 +4,11 @@ import "./index.css";
import App from "./App";
import { ThemeProvider } from "@material-ui/core";
import theme from "./theme.js";
ReactDOM.render(
<React.StrictMode>
<ThemeProvider>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</React.StrictMode>,

20
src/theme.js Normal file
View File

@ -0,0 +1,20 @@
import { createMuiTheme } from "@material-ui/core/styles";
const theme = createMuiTheme({
palette: {
primary: {
light: "#ffa4a2",
main: "#e57373",
dark: "#af4448",
contrastText: "#000",
},
secondary: {
light: "#ffeeff",
main: "#f8bbd0",
dark: "#c48b9f",
contrastText: "#000",
},
},
});
export default theme;