mui-theme-tweaker
v1.4.0
Published
A predefined Theme Tweaker for Material UI
Downloads
3
Readme
mui-theme-tweaker
A Theme Tweaker wrapper for Material UI
Install
npm install --save mui-theme-tweaker
Usage
Wrap your App with a Theme Provider
// index.tsx
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {theme} from './theme/theme';
import MuiProvider from '@material-ui/styles/ThemeProvider';
import { createThemeTweaker } from './theme/themeTweaker/themeTweaker';
const isDev = process.env.REACT_APP_ENV === "development";
const ThemeProvider = isDev ? createThemeTweaker(MuiProvider) : MuiProvider;
ReactDOM.render(
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
,
document.getElementById('root')
);
import React from 'react'
import {MuiTweaker} from 'mui-theme-tweaker';
const App = () => {
return <MuiTweaker/>
}
export default App
Note: You can create your own Tweaker component using the theme-tweaker package.
Dependencies:
Relying on React 16 and above
License
MIT © guygolanIL