-
Expanding on the Material_UI example in the JS Component section of the docs, the MUI components like I'm using this import: material_ui = idom.install("@material-ui/core", fallback="loading...") And trying to do things like this: theme = material_ui.styles.createMuiTheme({
'palette': {
'primary': material_ui.colors.teal,
'secondary': material_ui.colors.pink,
}
})
StyledButton = material_ui.styled(material_ui.Button)({
'minWidth': '6rem',
'margin': '0 0.5rem 0 0',
'&:hover': {'backgroundColor': theme.palette.secondary}
}) Since I'm essentially trying to get an IDOM equivalent of this: import { styled } from '@material-ui/core/styles'; but trying to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Unfortunately, as you've discovered, For a fully functional implementation of all Material UI's features you'd need to create a wrapper for the JS library using this template repository: https://github.com/idom-team/idom-react-component-cookiecutter. I'd be excited to help advise on such a project. |
Beta Was this translation helpful? Give feedback.
Unfortunately, as you've discovered,
idom.install
is not magic, and these are some of its fundamental limitations - all it does is install the package, give you access to any components it exports, and allows you to pass those components basic props.For a fully functional implementation of all Material UI's features you'd need to create a wrapper for the JS library using this template repository: https://github.com/idom-team/idom-react-component-cookiecutter. I'd be excited to help advise on such a project.