Skip to content

Commit 2d7d934

Browse files
Esemeseksouhe
authored andcommitted
fix Fix partial theme property (#25)
1 parent 7dbd8c4 commit 2d7d934

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

typings/__tests__/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ const ThemedTitle = withTheme(TitleComponent);
5454

5555
const App = () => (
5656
<ThemeProvider theme={themes.default}>
57-
<ThemedTitle title="React Theme Provider" primaryColor="pink" />
57+
<ThemedTitle title="React Theme Provider" theme={{ primaryColor: 'pink' }} />
5858
</ThemeProvider>
5959
);

typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type ThemingType<Theme, PartialTheme> = {
1111
ThemeProvider: ThemeProviderType<Theme>;
1212
withTheme: <Props extends { theme: Theme }>(
1313
Comp: React.ComponentType<Props>
14-
) => React.ComponentType<Without<Props, "theme"> & PartialTheme>;
14+
) => React.ComponentType<Without<Props, "theme"> & { theme: PartialTheme }>;
1515
};
1616

1717
// Library exports

0 commit comments

Comments
 (0)