In the following code code, I am using a custom theme in Material-UI:
import React from "react";
import ReactDOM from "react-dom";
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";
import Button from "@material-ui/core/Button";
import { purple, green } from "@material-ui/core/colors";
const theme = createMuiTheme({
palette: {
primary: purple,
secondary: green
}
});
function App() {
return (
<MuiThemeProvider theme={theme}>
<Button color="primary">Button1</Button>
<Button color="secondary">Button2</Button>
</MuiThemeProvider>
);
}
ReactDOM.render(<App />, document.getElementById("root"));
I am getting the following warning:
Warning: Material-UI: you are using the deprecated typography variants that will be removed in the next major release.
I am not using any typography (let alone any deprecated typography variant)
Why am I getting this warning? Can someone please explain.
Full demo at codesandbox: https://codesandbox.io/s/r5v9pjxnq4
Minimal repro code: https://codesandbox.io/s/p9628o7wlj
(Turns out just using createMuiTheme also gives the warning!)