mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
move MUI theme to own file
This commit is contained in:
14
src/App.tsx
14
src/App.tsx
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
|
||||
import { ThemeProvider } from "@material-ui/styles";
|
||||
import { createMuiTheme } from "@material-ui/core";
|
||||
import Theme from "./Theme";
|
||||
|
||||
import AuthView from "./views/AuthView";
|
||||
import TableView from "./views/TableView";
|
||||
@@ -9,20 +10,11 @@ import TablesView from "./views/TablesView";
|
||||
import { BrowserRouter as Router, Route } from "react-router-dom";
|
||||
import { AuthProvider } from "./AuthProvider";
|
||||
import CustomBrowserRouter from "./util/CustomBrowserRouter";
|
||||
|
||||
import PrivateRoute from "./util/PrivateRoute";
|
||||
const theme = createMuiTheme({
|
||||
spacing: 4,
|
||||
palette: {
|
||||
primary: {
|
||||
main: "#007bff"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<ThemeProvider theme={theme}>
|
||||
<ThemeProvider theme={Theme}>
|
||||
<AuthProvider>
|
||||
<CustomBrowserRouter>
|
||||
<div>
|
||||
|
||||
12
src/Theme.ts
Normal file
12
src/Theme.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { createMuiTheme } from "@material-ui/core";
|
||||
|
||||
const Theme = createMuiTheme({
|
||||
spacing: 4,
|
||||
palette: {
|
||||
primary: {
|
||||
main: "#007bff",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default Theme;
|
||||
Reference in New Issue
Block a user