Skip to content

Commit 01edb2a

Browse files
authored
Merge pull request #244 from DogusErdem/fix/component-props-intellisense
fix: Intellisense problems have been fixed.
2 parents 0c300df + 7673e8a commit 01edb2a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/core/KitraProvider.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,15 @@ export const KitraProvider =
121121
);
122122

123123
export function applyDefaults<T>(Component: ComponentType<T>) {
124-
return React.forwardRef((props: T | any, ref: ForwardedRef<any>) => (
124+
return React.forwardRef<any, T>((props, ref) => (
125125
<TypographyContext.Consumer>
126-
{typography =>
127-
<Component ref={ref} typography={typography?.typography} {...props} />
128-
}
126+
{typography => (
127+
<Component
128+
ref={ref}
129+
typography={typography?.typography}
130+
{...(props as T)}
131+
/>
132+
)}
129133
</TypographyContext.Consumer>
130134
));
131135
}

0 commit comments

Comments
 (0)