Skip to content

Commit c605b49

Browse files
authored
Merge pull request #143 from callstack/feat/usetheme-accept-theme-type
feat: accept dynamic theme type in useTheme hook
2 parents 07bec87 + 390eac2 commit c605b49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type ThemingType<Theme> = {
1515
$Without<Props, 'theme'> & { theme?: $DeepPartial<Theme> }
1616
> &
1717
hoistNonReactStatics.NonReactStatics<typeof WrappedComponent>;
18-
useTheme(overrides?: $DeepPartial<Theme>): Theme;
18+
useTheme<T = Theme>(overrides?: $DeepPartial<T>): T;
1919
};
2020

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

0 commit comments

Comments
 (0)