Skip to content

Commit

Permalink
Fix useTheme hook type
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaragao committed Mar 17, 2022
1 parent 8b3f0d3 commit 5fb9943
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/types/stitches.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export default interface Stitches<
useTheme: () => string &
{
[Scale in keyof Theme]: {
[Token in keyof Theme[Scale]]: number | string;
[Token in keyof Theme[Scale]]: ThemeUtil.Token<
Extract<Token, string | number>,
string,
Extract<Scale, string | void>
>;
};
};
ThemeProvider: React.FunctionComponent<{ theme?: any }>; // TODO: fix `any`
Expand Down

0 comments on commit 5fb9943

Please sign in to comment.