Permalink
Browse files

step 2 - create new theme

  • Loading branch information...
moshtaghi committed May 1, 2018
1 parent 6589503 commit 3882d49c228834c5463c85cf17e2b51899ff620d
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/layouts/Dashboard/Dashboard.jsx
@@ -1,6 +1,8 @@
import React from "react";
import PropTypes from "prop-types";
import { Switch, Route, Redirect } from "react-router-dom";
// import MuiThemeProvider and createMuiTheme to create custom theme
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
// creates a beautiful scrollbar
import PerfectScrollbar from "perfect-scrollbar";
import "perfect-scrollbar/css/perfect-scrollbar.css";
@@ -15,6 +17,11 @@ import appStyle from "assets/jss/material-dashboard-react/appStyle.jsx";
import image from "assets/img/sidebar-2.jpg";
import logo from "assets/img/reactlogo.png";
// create custom theme configuration
const theme = createMuiTheme({
direction: 'rtl'
});
const switchRoutes = (
<Switch>
{dashboardRoutes.map((prop, key) => {
@@ -47,6 +54,7 @@ class App extends React.Component {
render() {
const { classes, ...rest } = this.props;
return (
<MuiThemeProvider theme={theme}>
<div className={classes.wrapper}>
<Sidebar
routes={dashboardRoutes}
@@ -75,6 +83,7 @@ class App extends React.Component {
{this.getRoute() ? <Footer /> : null}
</div>
</div>
</MuiThemeProvider>
);
}
}

0 comments on commit 3882d49

Please sign in to comment.