We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0c300df + 7673e8a commit 01edb2aCopy full SHA for 01edb2a
1 file changed
src/core/KitraProvider.tsx
@@ -121,11 +121,15 @@ export const KitraProvider =
121
);
122
123
export function applyDefaults<T>(Component: ComponentType<T>) {
124
- return React.forwardRef((props: T | any, ref: ForwardedRef<any>) => (
+ return React.forwardRef<any, T>((props, ref) => (
125
<TypographyContext.Consumer>
126
- {typography =>
127
- <Component ref={ref} typography={typography?.typography} {...props} />
128
- }
+ {typography => (
+ <Component
+ ref={ref}
129
+ typography={typography?.typography}
130
+ {...(props as T)}
131
+ />
132
+ )}
133
</TypographyContext.Consumer>
134
));
135
}
0 commit comments