Security upgrades

This commit is contained in:
2020-07-15 19:54:48 +02:00
parent 59cc6c54cd
commit ad8ed283d2
3164 changed files with 408897 additions and 28 deletions

View File

@@ -0,0 +1,15 @@
export {};
interface ThemeWithProps<Components> {
props?: { [K in keyof Components]: Partial<Components[K]> };
}
type ThemedProps<Theme, Name extends keyof any> = Theme extends { props: Record<Name, infer Props> }
? Props
: {};
export default function getThemeProps<
Theme extends ThemeWithProps<any>,
Props,
Name extends keyof any
>(params: { props: Props; name: Name; theme?: Theme }): Props & ThemedProps<Theme, Name>;