Skip to content

Commit e6f3e54

Browse files
committed
fix lint
1 parent 08993f2 commit e6f3e54

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

packages/mui-material/perf-test/test-createTheme.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import * as React from 'react';
12
import Button from '@mui/material/Button';
2-
import { createTheme, type Theme } from '../src/stylesOptimized';
3+
import { createTheme } from '@mui/material/stylesOptimized';
4+
5+
<Button />;
36

47
export default createTheme({
58
components: {

packages/mui-material/src/stylesOptimized/ThemeProviderWithVars.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ type Result = ReturnType<
1010
export declare const CssVarsProvider: Result['CssVarsProvider'];
1111
export declare const useColorScheme: Result['useColorScheme'];
1212
export declare const getInitColorSchemeScript: Result['getInitColorSchemeScript'];
13+
// eslint-disable-next-line @typescript-eslint/naming-convention
1314
export declare function Experimental_CssVarsProvider(props: any): React.JSX.Element;

packages/mui-material/src/stylesOptimized/index.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
import { DistributiveOmit } from '@mui/types';
77

88
export { default as THEME_ID } from '../styles/identifier';
9-
export {
10-
default as createTheme,
11-
} from './createTheme';
9+
export { default as createTheme } from './createTheme';
1210
export type {
1311
// New types for augmenting the Theme Components
1412
CreateThemeComponent,
@@ -51,10 +49,7 @@ export type {
5149
Transitions,
5250
TransitionsOptions,
5351
} from '../styles/createTransitions';
54-
export {
55-
duration,
56-
easing,
57-
} from '../styles/createTransitions';
52+
export { duration, easing } from '../styles/createTransitions';
5853
export type { Mixins, CSSProperties, MixinsOptions } from '../styles/createMixins';
5954
export type {
6055
Direction,
@@ -89,8 +84,7 @@ export {
8984
} from '@mui/system';
9085
export { unstable_createBreakpoints } from '@mui/system/createBreakpoints';
9186
export { default as useTheme } from './useTheme';
92-
export { default as useThemeProps } from './useThemeProps';
93-
export * from './useThemeProps';
87+
export { default as useThemeProps, type ThemedProps, type ThemeWithProps } from './useThemeProps';
9488
export { default as styled } from './styled';
9589
export { default as ThemeProvider } from './ThemeProvider';
9690
export type { ThemeProviderProps } from './ThemeProvider';
@@ -121,6 +115,7 @@ export type StandardProps<
121115
style?: React.CSSProperties;
122116
};
123117

118+
// eslint-disable-next-line @typescript-eslint/no-namespace
124119
export namespace PropTypes {
125120
// keeping the type structure for backwards compat
126121
export type Color = 'inherit' | 'primary' | 'secondary' | 'default';

packages/mui-material/src/stylesOptimized/useThemeProps.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { Theme as ThemeWithProps } from './createTheme';
1+
import { ThemeComponents } from './createTheme';
2+
3+
export interface ThemeWithProps {
4+
components?: ThemeComponents;
5+
}
26

37
export type ThemedProps<Theme, Name extends keyof any> = Theme extends {
48
components: Record<Name, { defaultProps: infer Props }>;

0 commit comments

Comments
 (0)