I'm trying to include some components from @material-ui package at my app, using the ThemeProvider at the root, but i'm having some troubles.
Other components that use styles defined locally (without theme properties) render ok.
sandbox: https://codesandbox.io/s/theme-provider-issues-t72f3
Here is how the theme is being created:
import React from "react";
import { createMuiTheme } from "@material-ui/core/styles";
import { ThemeProvider } from "@material-ui/styles";
import { blue, white } from "@material-ui/core/colors";
function AppTheme(props) {
const theme = createMuiTheme({
palette: {
primary: blue,
text: white
}
});
return <ThemeProvider theme={theme}>{props.children}</ThemeProvider>;
}
export default AppTheme;