Skip to content

Commit

Permalink
fix(theme): style HOCs component arg type
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh authored Jun 4, 2019
1 parent b67c4c2 commit b18b8aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/framework/theme/style/styleConsumer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type StyledComponentClass<P> = React.ComponentClass<StyledComponentProps
* }
* ```
*/
export const styled = <P extends object>(Component: React.ComponentClass<P>): StyledComponentClass<P> => {
export const styled = <P extends object>(Component: React.ComponentType<P>): StyledComponentClass<P> => {

// @ts-ignore
if (!Component.styledComponentName) {
Expand Down
2 changes: 1 addition & 1 deletion src/framework/theme/theme/themeConsumer.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export type ThemedComponentClass<P> = React.ComponentClass<ThemedComponentProps
* }
* ```
*/
export const withStyles = <P extends object>(Component: React.ComponentClass<P>,
export const withStyles = <P extends object>(Component: React.ComponentType<P>,
createStyles?: CreateStylesFunction): ThemedComponentClass<P> => {

type WrappingProps = PrivateProps<WrappedElementInstance> & WrappedProps;
Expand Down

0 comments on commit b18b8aa

Please sign in to comment.