Skip to content

Commit b18b8aa

Browse files
authored
fix(theme): style HOCs component arg type
1 parent b67c4c2 commit b18b8aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/framework/theme/style/styleConsumer.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export type StyledComponentClass<P> = React.ComponentClass<StyledComponentProps
128128
* }
129129
* ```
130130
*/
131-
export const styled = <P extends object>(Component: React.ComponentClass<P>): StyledComponentClass<P> => {
131+
export const styled = <P extends object>(Component: React.ComponentType<P>): StyledComponentClass<P> => {
132132

133133
// @ts-ignore
134134
if (!Component.styledComponentName) {

src/framework/theme/theme/themeConsumer.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export type ThemedComponentClass<P> = React.ComponentClass<ThemedComponentProps
9292
* }
9393
* ```
9494
*/
95-
export const withStyles = <P extends object>(Component: React.ComponentClass<P>,
95+
export const withStyles = <P extends object>(Component: React.ComponentType<P>,
9696
createStyles?: CreateStylesFunction): ThemedComponentClass<P> => {
9797

9898
type WrappingProps = PrivateProps<WrappedElementInstance> & WrappedProps;

0 commit comments

Comments
 (0)