Using this tool https://react-theming.github.io/create-mui-theme/ I get a js file and a json file as mentioned on above theme generator page in respective paths as mentioned:
// src/ui/theme/index.js
/* src/ui/theme/theme.json */
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 https://material-ui.com/guides/typescript/
When I try this it does not work, any ideas if I am missing something?
// 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 });
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?