Open kaycebasques opened 6 years ago
cc @oliviertassinari maybe you'd be willing to take a poke at it
@kaycebasques I'm happy you are trying radium with Material-UI. I haven't tried. Yeah, I would love to see Radium under https://material-ui-next.com/guides/interoperability/.
you'd be willing to take a poke at it
I'm not sure how I can help. I can reproduce the issue with (no Material-UI involved):
import React from 'react';
import Radium, {StyleRoot} from 'radium';
const styles = {
card: {
backgroundColor: 'blue',
'@media (min-width: 600px)': { backgroundColor: 'red' }
},
};
function Paper(props) {
return <div {...props} />
}
class Card extends React.Component {
render() {
return (
<Paper style={styles.card}>
Card
</Paper>
);
}
}
export default Radium(Card);
I'm having a heck of a time getting Radium and Material UI to play nicely. Can you help me point out where I'm going wrong?
Live: https://materialui-radium.glitch.me/ Source: https://glitch.com/edit/#!/materialui-radium (edit the code and it automatically forks)
Expected:
Actual:
Console throws:
Warning: Unsupported style property @media (min-width: 600px). Did you mean @media (minWidth: 600px)? Check the render method of
Paper
.Questions:
StyleRoot
on my top-level component, do I need to wrap that component in Radium, also?Sorry if it ends up being pilot-error, I'm new to it all (React / Material UI / Radium), so it's quite likely something silly on my side. But I figure this is a potentially popular combo, so you might be willing to help getting some boilerplate up and running.