Skip to content

Instantly share code, notes, and snippets.

@nyarla
Created August 30, 2015 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyarla/1ef4ce2f19953f6249e9 to your computer and use it in GitHub Desktop.
Save nyarla/1ef4ce2f19953f6249e9 to your computer and use it in GitHub Desktop.
A example code for material-ui
"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