Rename "theme.tsx" to "ThemeCreator.ts"
This commit is contained in:
@@ -21,7 +21,7 @@ import EditIcon from '@mui/icons-material/Edit';
|
||||
import { bindDialog, usePopupState } from 'material-ui-popup-state/hooks';
|
||||
import { ThemeModeContext } from '@/modules/theme/contexts/ThemeModeContext.tsx';
|
||||
import { AppTheme, hasMissingFonts, loadThemeFonts } from '@/modules/theme/services/AppThemes.ts';
|
||||
import { createTheme } from '@/modules/theme/services/theme.tsx';
|
||||
import { createTheme } from '@/modules/theme/services/ThemeCreator.ts';
|
||||
import { ThemeCreationDialog } from '@/modules/theme/components/CreateThemeDialog.tsx';
|
||||
import { makeToast } from '@/modules/core/utils/Toast.ts';
|
||||
import { TypographyMaxLines } from '@/modules/core/components/TypographyMaxLines.tsx';
|
||||
|
||||
@@ -148,7 +148,7 @@ export const createAndSetTheme = (...args: Parameters<typeof createTheme>) => {
|
||||
return theme;
|
||||
};
|
||||
|
||||
export const getOptionForDirection = <T,>(
|
||||
export const getOptionForDirection = <T>(
|
||||
ltrOption: T,
|
||||
rtlOption: T,
|
||||
direction: Theme['direction'] = theme?.direction ?? 'ltr',
|
||||
@@ -158,7 +158,7 @@ export const useGetOptionForDirection = (): typeof getOptionForDirection => {
|
||||
const muiTheme = useTheme();
|
||||
|
||||
return useCallback(
|
||||
<T,>(...args: Parameters<typeof getOptionForDirection<T>>) => getOptionForDirection(...args),
|
||||
<T>(...args: Parameters<typeof getOptionForDirection<T>>) => getOptionForDirection(...args),
|
||||
[muiTheme.direction],
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user