Rename "theme.tsx" to "ThemeCreator.ts"

This commit is contained in:
schroda
2024-12-11 13:59:50 +01:00
parent b3e3d94bda
commit 8c4ff516c0
20 changed files with 21 additions and 21 deletions

View File

@@ -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],
);
};