Files
rtu_v5/v2/node_modules/@mui/system/useThemeProps/useThemeProps.d.ts
2026-05-29 14:48:36 +08:00

14 lines
455 B
TypeScript

export interface ThemeWithProps {
components?: any;
}
export type ThemedProps<Theme, Name extends keyof any> = Theme extends {
components: Record<Name, {
defaultProps: infer Props;
}>;
} ? Props : {};
export default function useThemeProps<Theme extends ThemeWithProps, Props, Name extends keyof any>(params: {
props: Props;
name: Name;
defaultTheme?: Theme | undefined;
themeId?: string | undefined;
}): Props & ThemedProps<Theme, Name>;