Skip to content

Commit

Permalink
Merge pull request #143 from callstack/feat/usetheme-accept-theme-type
Browse files Browse the repository at this point in the history
feat: accept dynamic theme type in useTheme hook
  • Loading branch information
RafikiTiki authored Sep 5, 2022
2 parents 07bec87 + 390eac2 commit c605b49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type ThemingType<Theme> = {
$Without<Props, 'theme'> & { theme?: $DeepPartial<Theme> }
> &
hoistNonReactStatics.NonReactStatics<typeof WrappedComponent>;
useTheme(overrides?: $DeepPartial<Theme>): Theme;
useTheme<T = Theme>(overrides?: $DeepPartial<T>): T;
};

export const createTheming: <Theme>(defaultTheme: Theme) => ThemingType<Theme>;

0 comments on commit c605b49

Please sign in to comment.