Skip to content

Commit

Permalink
Fix the type of the component prop on styled(Typography)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesricky committed Jan 24, 2024
1 parent 27e0e8b commit 1212c4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ export const Text = styled(Typography, {
overridesResolver(_, styles) {
return [styles.typography];
},
})();
})() as typeof Typography;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface AppHeaderButtonProps
ThemedComponentBaseProps<{
root: typeof ButtonBase;
inner: "div";
typography: typeof Typography;
typography: typeof Typography<"div">;
startIcon: "div";
endIcon: "div";
}> {
Expand All @@ -33,7 +33,6 @@ export function AppHeaderButton(inProps: AppHeaderButtonProps) {
(disableTypography ? (
{ children }
) : (
// @ts-expect-error TODO
<Text component="div" {...slotProps?.typography}>
{children}
</Text>
Expand Down

0 comments on commit 1212c4f

Please sign in to comment.