-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how does thememanager in 0.12.x work with meteor? #1754
Comments
@rkstar I'm not familiar with meteor, but do you have any code sample (proof of concept) that we could look at to see how it works with the new @oliviertassinari @hai-cea any ideas guys? Saw @mbrookes comment on #331. Maybe he has an idea? |
Sorry, I'm using it via izzilab:material-ui which is still at 0.11.0. @mrphu3074 is looking at 0.12.1 before updating given the breaking changes: mrphu3074/react-material-ui#15. |
@shaurya947 i was able to figure out the new thememanager setup, but i'm getting errors and problems with matching up versions of react and react-tap-event-plugin i've added issues linked to the different commits of code here: |
@rkstar support for 0.14-rc1 is still a work in progress. We created a different branch ( Have you tried it with v0.12.1 of Material-UI and v0.13.3 of React? |
yes, that's the first commit there. the one that uses "meteor/react-packages" is using 0.13.3 what did with this repo was make different commits for the different things i've tried. they give different sets of errors, so i figured it would make sense |
For kicks and giggles I installed Material-UI 0.12.1 via meteorhacks:npm & cosmos:browserify, and I don't seem to have a problem with react-tap-event-plugin. I did have to add a require for it to app.browserify.js, which is a bit odd, as I didn't have to add it packages.json. Maybe Material-UI is pulling it down as a dependancy. I'm using react via the official Meteor package if that make a difference. I had to stripped out all the 11.0 style ThemeManager calls and getChildContext functions to get it to work using the default theme, but I get a ton of React warnings: "owner-based and parent-based contexts differ". It may be that for meteor you have to define a theme and pass context. But how to actually call ThemeManager in MUI 0.12.x seems to be undocumented! How did you get that to work? |
@mbrookes can you give a code snip? when i remove the
|
@mbrookes here is how i got the ThemeManager to work: and yes, the docs for that are non-existent. i had to look through the code to figure it out. |
Docs about theme manager http://material-ui.com/#/customization/themes const React = require('react');
const ThemeManager = require('material-ui/lib/styles/theme-manager');
const MyRawTheme = require('path/to/your/raw/theme/file');
const MySampleAppComponent = React.createClass({
//the key passed through context must be called "muiTheme"
childContextTypes : {
muiTheme: React.PropTypes.object,
},
getChildContext() {
return {
muiTheme: ThemeManager.getMuiTheme(MyRawTheme),
};
},
...
}); |
@rkstar Thanks, I'll take a look. Looking at rkstar/meteor-material-ui-example#1, do you have And:
in lib/app.browserify.options.json? |
@mcevskb - that (sort of) documents how to use a custom theme, but neither the README nor the docs describe how to use the built in themes as far as I can tell. The docs refer you to the release notes, which refer you back to the docs. |
@rkstar, that worked for me, thanks:
|
i've posted a more extensive response and solution to the problem in mrphu3074/react-material-ui#15 |
I'd like to think it was a team effort. :) |
👍 |
what @mbrookes said |
* Make a script that assigning production and version domains to the production now * Update codesandbox template for v4 * Pass `type` right to the `inputProps` for better spreading experience
i posted a comment on an issue in the react-packages repo, but i'm mentioning it here as well because i think i'm at the point where this is a problem i'm having with the new ThemeManager setup.
any help is appreciated.
The text was updated successfully, but these errors were encountered: