import { createMakeStyles } from 'tss-react';
import { defaultTheme } from './themes/default';
import { ICustomTheme } from './themes/types';
function useTheme() {
// I need to cast this. Before createTheme turned my theme from ThemeOptions to type Theme
return defaultTheme as ICustomTheme;
}
export const { makeStyles } = createMakeStyles({ useTheme });
I know this is something i'm doing wrong, but I can't seem to figure it out. I just refactored everything to use the tss-api in mui 5.
My structure is as follows
AppThemeProvider.tsx
makeStyles.ts
usage:
I'm not sure what i'm missing here. Any help is greatly appreciated.