We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 651509a commit 91c90c0Copy full SHA for 91c90c0
src/styles/index.js
@@ -7,4 +7,5 @@ module.exports = {
7
Typography: require('./typography'),
8
LightRawTheme: require('./raw-themes/light-raw-theme'),
9
DarkRawTheme: require('./raw-themes/dark-raw-theme'),
10
+ ThemeDecorator: require('./theme-decorator'),
11
};
src/styles/theme-decorator.js
@@ -0,0 +1,25 @@
1
+const React = require('react');
2
+
3
+module.exports = (customTheme) => {
4
5
+ return function(Component) {
6
+ return React.createClass({
+ childContextTypes : {
+ muiTheme: React.PropTypes.object,
+ },
12
13
+ getChildContext () {
14
+ return {
15
+ muiTheme: customTheme,
16
+ };
17
18
19
+ render() {
20
+ return React.createElement(Component, null);
21
22
+ });
23
24
25
+}
0 commit comments