export interface ThemeWithProps { components?: { [K in keyof Components]: { defaultProps?: Partial } }; } export type ThemedProps = Theme extends { components: Record; } ? Props : {}; export default function useThemeProps< Theme extends ThemeWithProps, Props, Name extends keyof any >(params: { props: Props; name: Name }): Props & ThemedProps;