Typically when I use Radium in my React app, I would simply wrap my exported class inside Radium
export default Radium(App)
and media queries would work as expected. However, I want to use both connect from react-router
alongside Radium like this:
//Imports
import React from 'react'
import Radium from 'radium'
import { Table, TableBody } from 'material-ui/Table'
import { connect } from 'react-redux
const tableWrapper = {
width: '100%',
'@media screen and (max-width: 799px)': {
width: '50%'
}
}
render() {
<Table wrapperStyle={tableWrapper}>
<TableBody>
...
</TableBody>
</Table>
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(Object.assign({}, {update}), dispatch)
}
export default connect(null, mapDispatchToProps)(Radium(App))
export { App as AppNoRadium }
but I continue to receive the warning/error when I apply my styles:
Warning: Unsupported style property @media screen and (max-width: 799px). Did you mean @media screen and (maxWidth: 799px)?
Am I incorrectly wrapping my component inside Radium?