This repository has been archived on 2024-09-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
front/node_modules/@mui/system/useThemeProps/useThemeProps.d.ts
2024-09-18 13:34:19 -03:00

21 lines
440 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;
themeId?: string;
}): Props & ThemedProps<Theme, Name>;