title: How to use Material UI custom theme in React with Typescript
body: <p>Using this tool <a href="https://react-theming.github.io/create-mui-theme/" rel="nofollow noreferrer">https://react-theming.github.io/create-mui-theme/</a>
  I get a js file and a json file as mentioned on above theme generator page in respective paths as mentioned:</p>
  <pre><code>// src/ui/theme/index.js
  /* src/ui/theme/theme.json */
  </code></pre>
  <p>Now they work fine when I leave the file extension to js. As soon as I try to use js as a tsx file the editor starts complaining. I have all the necessary setup done via CRA Typescript in tsconfig file also. Also necessary config from this page <a href="https://material-ui.com/guides/typescript/" rel="nofollow noreferrer">https://material-ui.com/guides/typescript/</a></p>
  <p>When I try this it does not work, any ideas if I am missing something?</p>
  <pre><code>// My amended index.tsx file
  
  import { createMuiTheme } from '@material-ui/core/styles';
  
  const palette = {
    primary: { main: '#3f51b5' },
    secondary: { main: '#f50057' }
  };
  const themeName = 'San Marino Razzmatazz Sugar Gliders';
  
  export default createMuiTheme({ palette, themeName });
  </code></pre>
  <p>Also the theme.json is untouched by me.
  I am still learning sorry, any ideas if this is an interface problem and how to use it?</p>