-
-
Save nyarla/1ef4ce2f19953f6249e9 to your computer and use it in GitHub Desktop.
A example code for material-ui
This file contains 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
"use strict"; | |
import React from 'react'; | |
import MUI from 'material-ui'; | |
let ThemeManager = MUI.Styles.ThemeManager(); | |
let Colors = MUI.Styles.Colors; | |
ThemeManager.setTheme(ThemeManager.types.LIGHT); | |
let { | |
AppCanvas, AppBar | |
} = MUI; | |
class Application extends React.Component { | |
getChildContext() { | |
return { muiTheme: ThemeManager.getCurrentTheme() } | |
} | |
componentWillMount() { | |
ThemeManager.setPalette({ | |
accent1Color: Colors.deepOrange500 | |
}); | |
} | |
render() { | |
return ( | |
<AppCanvas> | |
<AppBar title="Neriume" /> | |
</AppCanvas> | |
) | |
} | |
} | |
Application.childContextTypes = { | |
muiTheme: React.PropTypes.object | |
}; | |
export { Application } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment